Don't show a notification if there is no error message

This commit is contained in:
Andrew Kingston 2022-01-20 13:37:20 +00:00
parent 978c3984e9
commit d3a4e34b3f
1 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,9 @@ export const API = createAPIClient({
// We could also log these to sentry.
// Or we could check error.status and redirect to login on a 403 etc.
onError: error => {
if (error.message) {
notificationStore.actions.error(error.message)
}
},
// Patch certain endpoints with functionality specific to client apps