diff --git a/src/app/app.interceptor.ts b/src/app/app.interceptor.ts index 871c67f6ed3be2a1e8aff9d7ce87e6d435a06286..f672651dccb64b86a9f6403f01d81ecea4bbd0f3 100644 --- a/src/app/app.interceptor.ts +++ b/src/app/app.interceptor.ts @@ -95,16 +95,18 @@ export class AuthInterceptor implements HttpInterceptor { } } if (!ignoreError) { - this.mds.appError$.next({ - label: label, - description: httpError.message, - category: "PROBLEM" - }); if (goToLoginPage) { + console.warn('AuthError' + httpError.status + ' (' + label + ')'); MainDataService.resetAuthData(); const state: RouterState = this.router.routerState; const snapshot: RouterStateSnapshot = state.snapshot; this.router.navigate(['/r/login', snapshot.url]); + } else { + this.mds.appError$.next({ + label: label, + description: httpError.message, + category: "PROBLEM" + }); } } }