[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:
k.triantafyllou 2020-11-16 13:49:10 +00:00
parent b916f19f57
commit f0e696536f
1 changed files with 9 additions and 3 deletions

View File

@ -21,10 +21,11 @@ import {PageURLResolverModule} from "./openaireLibrary/utils/pageURLResolver.mod
import {Schema2jsonldModule} from "./openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
import {CacheInterceptorService} from "./openaireLibrary/cache-interceptor.service";
import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-interceptor.service";
import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.service";
@NgModule({
imports: [
SharedModule,
CommonModule,
@ -56,8 +57,13 @@ import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-int
useClass: HttpInterceptorService,
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]
})