diff --git a/src/frontend/app/actions/send-to-record-management-action/send-to-record-management.component.html b/src/frontend/app/actions/send-to-record-management-action/send-to-record-management.component.html index 67f5401f4d174f1e8fce8599cec360813e23c62f..8f3f1f42f9db9bb726a13391a45d91290b6bf9de 100644 --- a/src/frontend/app/actions/send-to-record-management-action/send-to-record-management.component.html +++ b/src/frontend/app/actions/send-to-record-management-action/send-to-record-management.component.html @@ -127,7 +127,7 @@ </mat-tab-group> </ng-container> <div *ngIf="resourcesErrors.length > 0" class="alert-message alert-message-danger"> - {{'lang.' + resourcesErrors[0].lang | translate}} + {{resourcesErrors[0]}} </div> </div> <span class="divider-modal"></span> diff --git a/src/frontend/app/actions/send-to-record-management-action/send-to-record-management.component.ts b/src/frontend/app/actions/send-to-record-management-action/send-to-record-management.component.ts index 7c8efbbca477328e7a1d36d711fd7512d40f6f02..869ab34f24c09d72e1e87da8cd29f5b1656b268c 100644 --- a/src/frontend/app/actions/send-to-record-management-action/send-to-record-management.component.ts +++ b/src/frontend/app/actions/send-to-record-management-action/send-to-record-management.component.ts @@ -5,6 +5,7 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { TranslateService } from '@ngx-translate/core'; import { FunctionsService } from '@service/functions.service'; import { NotificationService } from '@service/notification/notification.service'; +import { error } from 'jquery'; import { of } from 'rxjs'; import { catchError, finalize, tap } from 'rxjs/operators'; @@ -129,7 +130,11 @@ export class SendToRecordManagementComponent implements OnInit { }), finalize(() => this.checking = false), catchError((err: any) => { - this.resourcesErrors.push(err.error); + if (!this.functions.empty(err.error.lang)) { + this.resourcesErrors.push(this.translate.instant('lang.' + err.error.lang)); + } else { + this.resourcesErrors.push(err.error.errors); + } // this.notify.handleErrors(err); return of(false); })