From d9b8ba95a747ef6ee344033640c6150e4bd8308d Mon Sep 17 00:00:00 2001 From: Michael Geers Date: Fri, 26 Dec 2025 18:37:27 +0100 Subject: [PATCH] fix: ui auth error on restart (#26176) --- assets/js/components/Auth/auth.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/js/components/Auth/auth.ts b/assets/js/components/Auth/auth.ts index cc73cb0b5..e8d72e3b6 100644 --- a/assets/js/components/Auth/auth.ts +++ b/assets/js/components/Auth/auth.ts @@ -20,7 +20,7 @@ export async function updateAuthStatus() { try { const res = await api.get("/auth/status", { - validateStatus: (code) => [200, 403, 501, 500].includes(code), + validateStatus: (code) => [200, 403, 404, 501, 500].includes(code), }); if (res.status === 501) { auth.configured = false; @@ -33,9 +33,12 @@ export async function updateAuthStatus() { auth.configured = true; auth.loggedIn = false; } + if (res.status === 404) { + console.log("unable to fetch auth status, server not ready yet", res); + } if (res.status === 500) { auth.loggedIn = null; - console.log("unable to fetch auth status", res); + console.log("unable to fetch auth status, internal server error", res); } } catch (e) { console.log("unable to fetch auth status", e);