File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ import {
44 HttpInterceptorFn ,
55 HttpRequest
66} from '@angular/common/http' ;
7+ import { inject } from '@angular/core' ;
8+ import { catchError , throwError } from 'rxjs' ;
9+
10+ import {
11+ NotificationService
12+ } from 'infrastructure/notification.service' ;
713
814interface ApiErrorResponse {
915 platform ?: string ;
@@ -12,13 +18,13 @@ interface ApiErrorResponse {
1218}
1319
1420export const httpErrorInterceptor : HttpInterceptorFn = (
15- req : HttpRequest < unknown > ,
21+ request : HttpRequest < unknown > ,
1622 next : HttpHandlerFn
1723) => {
1824 const notificationService =
1925 inject ( NotificationService ) ;
2026
21- return next ( req ) . pipe (
27+ return next ( request ) . pipe (
2228 catchError ( ( error : HttpErrorResponse ) => {
2329 const response =
2430 error . error as ApiErrorResponse | undefined ;
You can’t perform that action at this time.
0 commit comments