mirror of
https://github.com/lingble/chatwoot.git
synced 2026-03-20 03:52:43 +00:00
Fix error messages during login for non-verified users (#1945)
This commit is contained in:
@@ -149,7 +149,13 @@ export default {
|
||||
}
|
||||
|
||||
if (response && response.status === 401) {
|
||||
this.showAlert(this.$t('LOGIN.API.UNAUTH'));
|
||||
const { errors } = response.data;
|
||||
const hasAuthErrorMsg = errors && errors.length && errors[0] && typeof errors[0] === 'string';
|
||||
if (hasAuthErrorMsg) {
|
||||
this.showAlert(errors[0]);
|
||||
} else {
|
||||
this.showAlert(this.$t('LOGIN.API.UNAUTH'));
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.showAlert(this.$t('LOGIN.API.ERROR_MESSAGE'));
|
||||
|
||||
Reference in New Issue
Block a user