Fallback to BE response in login form
This commit is contained in:
parent
b9d484623c
commit
c822ce0c90
1 changed files with 2 additions and 0 deletions
|
@ -135,6 +135,8 @@ export function logIn(username, password) {
|
|||
}).catch(error => {
|
||||
if (error.response.data.error === 'mfa_required') {
|
||||
throw error;
|
||||
} else if(error.response.data.error) {
|
||||
dispatch(snackbar.error(error.response.data.error));
|
||||
} else {
|
||||
dispatch(snackbar.error('Wrong username or password'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue