KEYCLOAK-12102 Show proper error messages in new account console
Previously error codes were not properly translated in the account theme.
This commit is contained in:
parent
b532570747
commit
a9572e6ee9
1 changed files with 6 additions and 1 deletions
|
@ -100,8 +100,13 @@ export class AccountServiceClient {
|
|||
this.kcSvc.login();
|
||||
}
|
||||
console.log(error);
|
||||
|
||||
if (error != null && error.response != null && error.response.data != null && error.response.data.errorMessage) {
|
||||
ContentAlert.danger(error.response.data.errorMessage);
|
||||
} else {
|
||||
ContentAlert.danger(error.name + ': ' + error.message);
|
||||
}
|
||||
}
|
||||
|
||||
private makeConfig(endpoint: string, config: AxiosRequestConfig = {}): Promise<AxiosRequestConfig> {
|
||||
return new Promise( (resolve: ConfigResolve) => {
|
||||
|
|
Loading…
Reference in a new issue