From 8380f32228e908afeb35e324c6e01bde53d33940 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sat, 20 Jun 2026 18:30:01 +0200 Subject: [PATCH] Handle subtitle HTTP failures --- static/player/subtitles/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/player/subtitles/index.ts b/static/player/subtitles/index.ts index 82c9692..64c0265 100644 --- a/static/player/subtitles/index.ts +++ b/static/player/subtitles/index.ts @@ -30,7 +30,7 @@ const hideSubtitleText = (): void => { const loadSubtitle = async (url: string): Promise => { try { const res = await fetch(url); - if (!res.ok) return []; + if (!res.ok) throw new Error(`subtitle request failed with status ${res.status}`); return parseVtt(await res.text()); } catch (error) { console.error("failed to load subtitle:", error);