diff --git a/static/player/mode.ts b/static/player/mode.ts index a34fd1f..1c45f06 100644 --- a/static/player/mode.ts +++ b/static/player/mode.ts @@ -23,7 +23,7 @@ const fetchModeSource = async ( `/api/watch/episode/${state.episode.malID}/${encodeURIComponent(episode)}?mode=${encodeURIComponent(mode)}`, { signal }, ); - if (!res.ok) return null; + if (!res.ok) throw new Error(`mode source request failed with status ${res.status}`); const data: unknown = await res.json(); if (!isRecord(data)) return null; @@ -54,6 +54,7 @@ export const ensurePreferredModeSource = async (signal?: AbortSignal): Promise updateModeButtons(); } catch (error: unknown) { if (error instanceof DOMException && error.name === "AbortError") return; + console.error("failed to hydrate alternate mode:", error); } };