Skip to content

Commit

Permalink
Fixed 500 status code bad error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
jain-naman-sf committed Oct 30, 2023
1 parent bc54d71 commit bd0d962
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/js/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ const apiFetch = (
if (suppressErrorsOn.includes(response.status)) {
return null;
}
if (response.status === 500) {
return 'Something went Wrong';
}
let msg = response.statusText;
if (body) {
if (typeof body === 'string') {
Expand Down

0 comments on commit bd0d962

Please sign in to comment.