Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

studio/web: differentiate offline from backend-down in fetch error (#5591)

Daniel Han3b08d4a431c7
diff --git a/studio/frontend/src/features/auth/api.ts b/studio/frontend/src/features/auth/api.ts
index cc5749a9233..1c0909454da 100644
--- a/studio/frontend/src/features/auth/api.ts
+++ b/studio/frontend/src/features/auth/api.ts
@@ -159,6 +159,14 @@ export async function authFetch(
});
} catch (err) {
if (err instanceof TypeError) {
+ // fetch TypeError = offline | backend down | CORS/DNS. In Tauri
+ // it's always backend-down; in the web build distinguish offline
+ // so the user gets the right recovery path.
+ if (!isTauri && typeof navigator !== "undefined" && navigator.onLine === false) {
+ throw new Error(
+ "You appear to be offline. Check your network connection and try again.",
+ );
+ }
throw new Error("Studio isn't running -- please relaunch it.");
}
throw err;