From f2310b69257c84932c5835eb2e8161f0b2baa67b Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Fri, 21 Nov 2025 00:50:58 +0000 Subject: [PATCH] fix: Provide detailed error for story fetch failures Co-authored-by: aider (gemini/gemini-2.5-pro) --- webclient/src/Feed.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webclient/src/Feed.js b/webclient/src/Feed.js index 4681d20..f5c10d9 100644 --- a/webclient/src/Feed.js +++ b/webclient/src/Feed.js @@ -39,7 +39,9 @@ function Feed({ updateCache }) { const storyRes = await fetch('/api/' + newStory.id, { signal: controller.signal }); clearTimeout(timeoutId); - if (!storyRes.ok) throw new Error('Story fetch failed'); + if (!storyRes.ok) { + throw new Error(`Server responded with ${storyRes.status} ${storyRes.statusText}`); + } const storyResult = await storyRes.json(); const fullStory = storyResult.story;