diff --git a/app/javascript/dashboard/routes/login/Login.vue b/app/javascript/dashboard/routes/login/Login.vue index 24541da90..a56a02ad6 100644 --- a/app/javascript/dashboard/routes/login/Login.vue +++ b/app/javascript/dashboard/routes/login/Login.vue @@ -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'));