Skip to content

Commit

Permalink
Fixed 500 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 f9ce415
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 @@ -72,6 +72,9 @@ const apiFetch = (
msg = body.non_field_errors;
}
}
if (response.status === 500) {
msg = 'Something Went Wrong';
}
dispatch(addError(msg));
const error: ApiError = new Error(msg);
error.response = response;
Expand Down

0 comments on commit f9ce415

Please sign in to comment.