From 592d4dcf3c217715b6c2b230e37175382d7ac336 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 18 Feb 2025 20:09:47 +0100 Subject: [PATCH] Improve error handling --- apps/client/src/app/core/http-response.interceptor.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/client/src/app/core/http-response.interceptor.ts b/apps/client/src/app/core/http-response.interceptor.ts index 018e441fc..62c3540f7 100644 --- a/apps/client/src/app/core/http-response.interceptor.ts +++ b/apps/client/src/app/core/http-response.interceptor.ts @@ -108,10 +108,12 @@ export class HttpResponseInterceptor implements HttpInterceptor { }); } } else if (error.status === StatusCodes.UNAUTHORIZED) { - if (this.webAuthnService.isEnabled()) { - this.router.navigate(['/webauthn']); - } else if (!error.url.includes('/data-providers/ghostfolio/status')) { - this.tokenStorageService.signOut(); + if (!error.url.includes('/data-providers/ghostfolio/status')) { + if (this.webAuthnService.isEnabled()) { + this.router.navigate(['/webauthn']); + } else { + this.tokenStorageService.signOut(); + } } }