Skip to content

Commit

Permalink
fix: add check for potentially missing data on API error (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio-silva authored Feb 20, 2025
1 parent e181a72 commit e9e0fa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/apps/everest/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const addApiErrorInterceptor = () => {
error.response.status >= 400 &&
error.response.status <= 500
) {
let message = error.response.data.message ?? DEFAULT_ERROR_MESSAGE;
let message = error.response.data?.message ?? DEFAULT_ERROR_MESSAGE;
let notificationsDisabled = error.config?.disableNotifications;

if (typeof notificationsDisabled === 'function') {
Expand Down

0 comments on commit e9e0fa2

Please sign in to comment.