[CST-6153] Show i18n message instead of server error response

This commit is contained in:
Giuseppe Digilio
2022-09-20 11:41:09 +02:00
parent f787491af4
commit 5099d0b18a
2 changed files with 7 additions and 4 deletions

View File

@@ -157,7 +157,8 @@ export class ProfilePageComponent implements OnInit {
);
} else {
this.notificationsService.error(
this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.title'), response.errorMessage
this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.title'),
this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.change-failed')
);
}
});

View File

@@ -3093,6 +3093,8 @@
"profile.security.form.notifications.error.title": "Error changing passwords",
"profile.security.form.notifications.error.change-failed": "An error occurred while trying to change the password. Please check if the current password is correct.",
"profile.security.form.notifications.error.not-long-enough": "The password has to be at least 6 characters long.",
"profile.security.form.notifications.error.not-same": "The provided passwords are not the same.",