ciyidogan commited on
Commit
729e4c2
·
verified ·
1 Parent(s): 3046f4e

Update flare-ui/src/app/app.config.ts

Browse files
Files changed (1) hide show
  1. flare-ui/src/app/app.config.ts +6 -3
flare-ui/src/app/app.config.ts CHANGED
@@ -1,14 +1,17 @@
1
- import { ApplicationConfig } from '@angular/core';
2
  import { provideRouter } from '@angular/router';
3
  import { routes } from './app.routes';
4
  import { provideAnimations } from '@angular/platform-browser/animations';
5
- import { provideHttpClient, withInterceptors } from '@angular/common/http';
6
  import { authInterceptor } from './interceptors/auth.interceptor';
 
7
 
8
  export const appConfig: ApplicationConfig = {
9
  providers: [
10
  provideRouter(routes),
11
  provideAnimations(),
12
- provideHttpClient(withInterceptors([authInterceptor]))
 
 
13
  ]
14
  };
 
1
+ import { ApplicationConfig, ErrorHandler } from '@angular/core';
2
  import { provideRouter } from '@angular/router';
3
  import { routes } from './app.routes';
4
  import { provideAnimations } from '@angular/platform-browser/animations';
5
+ import { provideHttpClient, withInterceptors, HTTP_INTERCEPTORS } from '@angular/common/http';
6
  import { authInterceptor } from './interceptors/auth.interceptor';
7
+ import { GlobalErrorHandler, ErrorInterceptor } from './services/error-handler.service';
8
 
9
  export const appConfig: ApplicationConfig = {
10
  providers: [
11
  provideRouter(routes),
12
  provideAnimations(),
13
+ provideHttpClient(withInterceptors([authInterceptor])),
14
+ { provide: ErrorHandler, useClass: GlobalErrorHandler },
15
+ { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true }
16
  ]
17
  };