From 70d0d68fd9b042754948b2878998b15d03883a24 Mon Sep 17 00:00:00 2001 From: chevron7 Date: Wed, 10 Jun 2026 10:15:44 -0500 Subject: [PATCH] fix(podcast): widen preview client timeout to 25s for headroom The backend preview can take ~18s worst case on the Deezer path (Deezer fetch + iTunes resolve + the 8s RSS bound). A 20s client abort left only a 2s margin, so a slow but answerable feed could be aborted and shown as a false timeout. 25s keeps a clear gap over the server while still bounding the #168 hang. --- frontend/lib/api.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/lib/api.ts b/frontend/lib/api.ts index aa6b314..cc1467a 100644 --- a/frontend/lib/api.ts +++ b/frontend/lib/api.ts @@ -1076,7 +1076,10 @@ class ApiClient { // timeout the request aborts and the hook renders its error surface // instead of an endless spinner (#168). const controller = new AbortController(); - const timer = setTimeout(() => controller.abort(), 20000); + // Headroom over the backend's worst-case preview time (~18s on the Deezer + // path: Deezer fetch + iTunes resolve + the 8s RSS bound) so a slow but + // answerable feed isn't aborted and shown as a false timeout (#168). + const timer = setTimeout(() => controller.abort(), 25000); try { return await this.request(`/podcasts/preview/${itunesId}`, { signal: controller.signal }); } catch (err) {