Skip to content

Commit

Permalink
[frontend] Fix on bad request message being ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimfacion committed Jan 14, 2025
1 parent 51f58ec commit c97c26b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openbas-front/src/utils/Action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ const notifyError = (error: AxiosError) => {
} else if (error.status === 409) {
MESSAGING$.notifyError(intl.formatMessage({ id: 'The element already exists' }));
} else if (error.status === 400) {
MESSAGING$.notifyError(intl.formatMessage({ id: 'Bad request' }));
if (error.message) {
MESSAGING$.notifyError(intl.formatMessage({ id: error.message }));
} else {
MESSAGING$.notifyError(intl.formatMessage({ id: 'Bad request' }));
}
} else if (error.status === 500) {
MESSAGING$.notifyError(intl.formatMessage({ id: 'Internal error' }));
} else if (error.message) {
Expand Down

0 comments on commit c97c26b

Please sign in to comment.