[Explore | Trunk]: Add error interceptor
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@59859 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
b916f19f57
commit
f0e696536f
|
@ -21,10 +21,11 @@ import {PageURLResolverModule} from "./openaireLibrary/utils/pageURLResolver.mod
|
||||||
import {Schema2jsonldModule} from "./openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
import {Schema2jsonldModule} from "./openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
|
||||||
import {CacheInterceptorService} from "./openaireLibrary/cache-interceptor.service";
|
import {CacheInterceptorService} from "./openaireLibrary/cache-interceptor.service";
|
||||||
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
|
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
|
||||||
|
import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.service";
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
||||||
imports: [
|
imports: [
|
||||||
SharedModule,
|
SharedModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
@ -56,8 +57,13 @@ import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-int
|
||||||
useClass: HttpInterceptorService,
|
useClass: HttpInterceptorService,
|
||||||
multi: true
|
multi: true
|
||||||
},
|
},
|
||||||
[{ provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true }],
|
{
|
||||||
[{ provide: DEFAULT_TIMEOUT, useValue: 30000 }]
|
provide: HTTP_INTERCEPTORS,
|
||||||
|
useClass: ErrorInterceptorService,
|
||||||
|
multi: true
|
||||||
|
},
|
||||||
|
[{provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true}],
|
||||||
|
[{provide: DEFAULT_TIMEOUT, useValue: 30000}]
|
||||||
],
|
],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue