Skip to content
Snippets Groups Projects
Commit 6e12b7ea authored by mechtelm's avatar mechtelm
Browse files

bugfix empty error msg to login #108

parent 58a47815
No related branches found
No related tags found
No related merge requests found
...@@ -95,16 +95,18 @@ export class AuthInterceptor implements HttpInterceptor { ...@@ -95,16 +95,18 @@ export class AuthInterceptor implements HttpInterceptor {
} }
} }
if (!ignoreError) { if (!ignoreError) {
this.mds.appError$.next({
label: label,
description: httpError.message,
category: "PROBLEM"
});
if (goToLoginPage) { if (goToLoginPage) {
console.warn('AuthError' + httpError.status + ' (' + label + ')');
MainDataService.resetAuthData(); MainDataService.resetAuthData();
const state: RouterState = this.router.routerState; const state: RouterState = this.router.routerState;
const snapshot: RouterStateSnapshot = state.snapshot; const snapshot: RouterStateSnapshot = state.snapshot;
this.router.navigate(['/r/login', snapshot.url]); this.router.navigate(['/r/login', snapshot.url]);
} else {
this.mds.appError$.next({
label: label,
description: httpError.message,
category: "PROBLEM"
});
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment