X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fservices%2FRestService.ts;fp=src%2Fservices%2FRestService.ts;h=d3d9ea0d26ec1edf81e3a1a4305c4fdc10044092;hb=0fa417ac88c88f5716f7a5617d111ed05545cbe8;hp=bea559a7fa94cd4fdd9b8804258cd754efa2a7ce;hpb=faf168f6b4d44a688ca7857b7937ed891b0b71b9;p=osm%2FNG-UI.git diff --git a/src/services/RestService.ts b/src/services/RestService.ts index bea559a..d3d9ea0 100644 --- a/src/services/RestService.ts +++ b/src/services/RestService.ts @@ -141,8 +141,11 @@ export class RestService { this.notifierService.notify('error', err.error.detail !== undefined ? err.error.detail : this.translateService.instant('HTTPERROR.401')); } - this.activeModal.dismissAll(); + } else { + this.notifierService.notify('error', err?.error?.detail !== undefined ? + err?.error?.detail : this.translateService.instant('HTTPERROR.401')); } + this.activeModal.dismissAll(); } else if (err.error.status === HttpStatus.BAD_REQUEST) { this.notifierService.notify('error', err.error.detail !== undefined ? err.error.detail : this.translateService.instant('HTTPERROR.400')); @@ -177,7 +180,7 @@ export class RestService { }); return { url: apiURL, - httpOptions: {headers : apiHeaders} + httpOptions: { headers: apiHeaders } }; } }