mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 03:30:25 +00:00
Fix Server Errors Appear As Blank Red Bar (#9747)
* fix path to error message * changed error message path to check user auth error
This commit is contained in:
parent
b6305826be
commit
db0a6f6bb8
1 changed files with 2 additions and 2 deletions
|
|
@ -207,7 +207,7 @@ export default {
|
|||
if (error.response.status >= 400) {
|
||||
// Check for conditions to reset the user auth
|
||||
const invalidUserMessage = [this.$t('invalidCredentials'), 'Missing authentication headers.'];
|
||||
if (invalidUserMessage.indexOf(error.response.data.message) !== -1) {
|
||||
if (invalidUserMessage.indexOf(error.response.data) !== -1) {
|
||||
this.$store.dispatch('auth:logout');
|
||||
}
|
||||
|
||||
|
|
@ -222,7 +222,7 @@ export default {
|
|||
|
||||
this.$store.dispatch('snackbars:add', {
|
||||
title: 'Habitica',
|
||||
text: error.response.data.message,
|
||||
text: error.response.data,
|
||||
type: 'error',
|
||||
timeout: true,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue