Delete unnecessary red banners
Change-Id: I078abbc7b27e97db8a439851f292bf4aeabcf187
Issue-ID: NONRTRIC-599
Signed-off-by: maximesson <maxime.bonneau@est.tech>
diff --git a/webapp-frontend/src/app/interceptor.mock.ts b/webapp-frontend/src/app/interceptor.mock.ts
index 844513b..abb45ce 100644
--- a/webapp-frontend/src/app/interceptor.mock.ts
+++ b/webapp-frontend/src/app/interceptor.mock.ts
@@ -195,17 +195,17 @@
url: CONSUMER_PATH + "/info-jobs/job3/status",
json: job3Status,
},
- {
- url: '/a1-policy/v2/configuration',
- json: ricconfig
- }
+ {
+ url: '/a1-policy/v2/configuration',
+ json: ricconfig
+ }
];
@Injectable()
export class HttpMockRequestInterceptor implements HttpInterceptor {
private toggleTypes = true;
- constructor(private injector: Injector) {}
+ constructor(private injector: Injector) { }
intercept(
request: HttpRequest<any>,
@@ -229,7 +229,7 @@
}
}
- if (result) {
+ if (result) {
console.log(
"Mock answering http call :" + request.method + " " + request.url,
request.method === "PUT" ? request.body : null
diff --git a/webapp-frontend/src/app/interceptor.ts b/webapp-frontend/src/app/interceptor.ts
index 65ce887..3bceb5e 100644
--- a/webapp-frontend/src/app/interceptor.ts
+++ b/webapp-frontend/src/app/interceptor.ts
@@ -27,18 +27,27 @@
@Injectable()
export class HttpRequestInterceptor implements HttpInterceptor {
- constructor(private notificationService: NotificationService) {}
+ constructor(private notificationService: NotificationService) { }
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
console.log('Interceptor Invoked' + request.url);
- return next.handle(request).pipe(
- catchError((error: HttpErrorResponse) => {
- console.error("Error from error interceptor", error);
+ if (!request.url.includes("info-jobs")) {
+ return next.handle(request).pipe(
+ catchError((error: HttpErrorResponse) => {
+ console.error("Error from error interceptor", error);
- // show dialog for error message
- this.notificationService.error(error.message);
- return throwError(error);
- })
- ) as Observable<HttpEvent<any>>;
+ // show dialog for error message
+ this.notificationService.error(error.message);
+ return throwError(error);
+ })
+ ) as Observable<HttpEvent<any>>;
+ } else {
+ return next.handle(request).pipe(
+ catchError((error: HttpErrorResponse) => {
+ console.error("Error from error interceptor", error);
+ return throwError(error);
+ })
+ ) as Observable<HttpEvent<any>>;
+ }
}
}