mirror of
https://github.com/Chevron7Locked/kima-hub.git
synced 2026-06-19 07:37:17 +00:00
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:
+4
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user