Fix login error messages
This commit is contained in:
parent
e147ca65e0
commit
fd619ab47b
|
|
@ -50,7 +50,6 @@ export default {
|
|||
if (response.data) {
|
||||
redirectRouteName = 'registration';
|
||||
}
|
||||
|
||||
this.$apollo.mutate({
|
||||
mutation: HELLO_EMAIL_MUTATION,
|
||||
variables: {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ export default {
|
|||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
if (error.response.data.message && error.response.data.message === 'Sie haben sich nicht korrekt eingeloggt oder Ihr Konto ist vor\u00fcbergehend deaktiviert.') {
|
||||
this.passwordErrors = ['Sie haben sich nicht korrekt eingeloggt oder Ihr Konto ist vorübergehend deaktiviert.'];
|
||||
} else {
|
||||
|
|
@ -97,8 +96,7 @@ export default {
|
|||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn(e);
|
||||
that.loginError = 'Es ist ein Fehler aufgetreten. Bitte versuchen Sie nochmals.';
|
||||
that.passwordErrors = ['Es ist ein Fehler aufgetreten. Bitte versuchen Sie nochmals.'];
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -106,7 +104,10 @@ export default {
|
|||
const firstError = errors.graphQLErrors[0];
|
||||
switch (firstError.message) {
|
||||
case 'invalid_credentials':
|
||||
that.loginError = 'Die E-Mail oder das Passwort ist falsch. Bitte versuchen Sie nochmals.';
|
||||
that.passwordErrors = ['Die E-Mail oder das Passwort ist falsch. Bitte versuchen Sie nochmals.'];
|
||||
break;
|
||||
case 'email_not_verified':
|
||||
that.passwordErrors = ['Bitte verifiziere zuerst deine E-Mail.'];
|
||||
break;
|
||||
case 'no_valid_license':
|
||||
this.$router.push({name: 'licenseActivation'})
|
||||
|
|
|
|||
Loading…
Reference in New Issue