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:
Thomas Darimont 2020-02-03 15:46:32 +01:00 committed by Stan Silvert
parent b532570747
commit a9572e6ee9

View file

@ -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) => {