Fix error message display for login page (CC-71)
parent
118214a906
commit
f33c1e556a
|
@ -38,7 +38,8 @@ export class LoginComponent implements OnInit {
|
|||
this.router.navigate([this.returnUrl]);
|
||||
},
|
||||
error => {
|
||||
this.snackBarService.showError(error._body, 15000);
|
||||
// TODO: return i18n key from backend to use translate error method
|
||||
this.snackBarService.showUntranslatedError(error.error, 15000);
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -42,4 +42,8 @@ export class SnackBarService {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
showUntranslatedError(message: string, duration?: number) {
|
||||
return this.show(message, 'OK', duration, ['custom-snack-bar', 'label-danger']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue