Skip to content

Commit

Permalink
SHIBUI-1656 Fixed error response
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Nov 26, 2019
1 parent ba3a84e commit 471529d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/src/app/metadata/filter/effect/collection.effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,12 @@ export class FilterCollectionEffects {
map(action => action.payload.error),
withLatestFrom(this.store.select(fromI18n.getMessages)),
map(([error, messages]) => {
const message = error.errorMessage || error.cause || 'message.filter-fail';
const translated = this.i18nService.translate(message, null, messages);
return new AddNotification(
new Notification(
NotificationType.Danger,
`${error.errorCode}: ${this.i18nService.translate(error.errorMessage || 'message.filter-fail', null, messages)}`,
`${error.errorCode}: ${translated}`,
8000
)
);
Expand Down

0 comments on commit 471529d

Please sign in to comment.