[Library | Trunk]: Error interceptor let get methods of registry pass
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60624 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
07b659525e
commit
04f8e00242
|
@ -117,7 +117,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
this.pending = users;
|
this.pending = users;
|
||||||
this.loadPending = false;
|
this.loadPending = false;
|
||||||
}, error => {
|
}, error => {
|
||||||
this.active = [];
|
this.pending = [];
|
||||||
this.loadPending = false;
|
this.loadPending = false;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ export class ErrorInterceptorService implements HttpInterceptor {
|
||||||
|
|
||||||
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||||
return next.handle(req).pipe(catchError(err => {
|
return next.handle(req).pipe(catchError(err => {
|
||||||
if ((err.status === 0 && properties.registryUrl && this.isService(req, properties.registryUrl)) ||
|
if ((err.status === 0 && properties.registryUrl && this.isService(req, properties.registryUrl) && req.method !== 'GET') ||
|
||||||
(err.status === 401 && !this.isService(req, ErrorInterceptorService.UNAUTHORIZED_WHITELIST))) {
|
(err.status === 401 && !this.isService(req, ErrorInterceptorService.UNAUTHORIZED_WHITELIST))) {
|
||||||
this.logOut();
|
this.logOut();
|
||||||
} else if(err.status === 403 && !this.isService(req, ErrorInterceptorService.UNAUTHORIZED_WHITELIST)) {
|
} else if(err.status === 403 && !this.isService(req, ErrorInterceptorService.UNAUTHORIZED_WHITELIST)) {
|
||||||
|
|
Loading…
Reference in New Issue