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,7 +100,12 @@ export class AccountServiceClient {
|
|||
this.kcSvc.login();
|
||||
}
|
||||
console.log(error);
|
||||
ContentAlert.danger(error.name + ': ' + error.message);
|
||||
|
||||
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> {
|
||||
|
|
Loading…
Reference in a new issue