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.
This commit is contained in:
chevron7
2026-06-10 10:15:44 -05:00
parent 2753bb752d
commit 70d0d68fd9
+4 -1
View File
@@ -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<ApiData>(`/podcasts/preview/${itunesId}`, { signal: controller.signal });
} catch (err) {