Display 500 errors via a snack (#193)

This commit is contained in:
Jannis Mattheis 2019-05-26 20:55:25 +02:00 committed by GitHub
parent 67493c643e
commit 05a1aa2651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ export const initAxios = (currentUser: CurrentUser, snack: SnackReporter) => {
currentUser.tryAuthenticate().then(() => snack('Could not complete request.')); currentUser.tryAuthenticate().then(() => snack('Could not complete request.'));
} }
if (status === 400) { if (status === 400 || status === 403 || status === 500) {
snack(error.response.data.error + ': ' + error.response.data.errorDescription); snack(error.response.data.error + ': ' + error.response.data.errorDescription);
} }