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

View File

@@ -20,7 +20,7 @@ export const initAxios = (currentUser: CurrentUser, snack: SnackReporter) => {
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);
}