diff --git a/web-ui/src/app/app.component.ts b/web-ui/src/app/app.component.ts index 1c05f71..9fc1626 100644 --- a/web-ui/src/app/app.component.ts +++ b/web-ui/src/app/app.component.ts @@ -35,6 +35,7 @@ export class AppComponent { // messages 'message.serverUnavailable': 'The server unavailable, please try again in a minute', + 'message.unknownError': 'Unknown error, please try again in a minute', // actions 'action.find': 'Find', diff --git a/web-ui/src/app/services/error.service.ts b/web-ui/src/app/services/error.service.ts index a7a5051..3996a24 100644 --- a/web-ui/src/app/services/error.service.ts +++ b/web-ui/src/app/services/error.service.ts @@ -33,8 +33,8 @@ export class ErrorService { this.setFieldError(form, fieldName, message); } } else { - const message = element.message; - this.notificationService.error(message); + this.translateService.get(element.message || 'message.unknownErrors') + .subscribe(msg => this.notificationService.error(msg)); } }); }