Skip to content
Snippets Groups Projects
Commit be2f1a06 authored by OZGCloud's avatar OZGCloud
Browse files

Merge branch 'OZG-4949-PostfachGetAndCreate' of...

Merge branch 'OZG-4949-PostfachGetAndCreate' of git.ozg-sh.de:ozgcloud-app/alfa into OZG-4949-PostfachGetAndCreate
parents 550cbc94 b82a62d8
No related branches found
No related tags found
No related merge requests found
......@@ -21,25 +21,13 @@
* Die sprachspezifischen Genehmigungen und Beschränkungen
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
import {
HttpErrorResponse,
HttpEvent,
HttpHandler,
HttpInterceptor,
HttpRequest,
} from '@angular/common/http';
import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
import { Injectable } from '@angular/core';
import {
ApiError,
HttpErrorHandler,
isForbidden,
isServerError,
isUnauthorized,
} from '@alfa-client/tech-shared';
import { AuthService } from '@alfa-client/app-shared';
import { ApiError, HttpErrorHandler, isForbidden, isServerError, isUnauthorized } from '@alfa-client/tech-shared';
import { DialogService, Messages, SnackBarService } from 'libs/ui/src';
import { EMPTY, Observable, throwError } from 'rxjs';
import { catchError, finalize } from 'rxjs/operators';
import { AuthService } from '@alfa-client/app-shared';
@Injectable()
export class HttpErrorInterceptor implements HttpInterceptor {
......@@ -66,7 +54,7 @@ export class HttpErrorInterceptor implements HttpInterceptor {
return this.handleError(error);
}
return throwError(() => ({ error: error.response }));
return throwError({ error: error.response });
}
handleError(error: any): Observable<any> {
......@@ -82,8 +70,9 @@ export class HttpErrorInterceptor implements HttpInterceptor {
}
if (isForbidden(errorResponse.status)) {
this.handleForbiddenError();
// return EMPTY;
}
return throwError(() => ({ error: errorResponse }));
return throwError({ error: errorResponse });
}
private handleServerError(error: ApiError): void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment