From 011f00e5de0eab1c50b80a89fec64995f0c0a4f6 Mon Sep 17 00:00:00 2001
From: Thomas Basler <thomas@familie-basler.net>
Date: Fri, 12 Apr 2024 20:38:28 +0200
Subject: [PATCH] Fix: If unauthenticaed, the redirect to login page did not
 work

---
 webapp/src/utils/authentication.ts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/webapp/src/utils/authentication.ts b/webapp/src/utils/authentication.ts
index f666c36be..e0e96b705 100644
--- a/webapp/src/utils/authentication.ts
+++ b/webapp/src/utils/authentication.ts
@@ -74,6 +74,7 @@ export function handleResponse(response: Response, emitter: Emitter<Record<Event
                 logout();
                 emitter.emit("logged-out");
                 router.push({ path: "/login", query: { returnUrl: router.currentRoute.value.fullPath } });
+                return Promise.reject();
             }
 
             const error = { message: (data && data.message) || response.statusText, status: response.status || 0 };