You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The request timeout doesn't cover reading the response body #367
src/lib/api.ts:88-101 attaches AbortSignal.timeout(timeoutMs) to the fetch call, which resolves as soon as the response headers arrive. The
body is read afterwards, outside any timeout:
A backend that sends 200 OK and then stalls mid-body — a hung streaming
response, a dropped TCP connection without a FIN, a proxy that times out
upstream after flushing headers — leaves these awaits pending forever. Every
page that calls apiFetch sets a loading flag before the call and clears it
in finally, so the UI stays on "Loading…" or a disabled "Working…" button
indefinitely. That is precisely the state #54 added DEFAULT_TIMEOUT_MS to
prevent, for the half of the request it doesn't cover.
Fix: keep the timeout signal alive across the body read — race the res.json() promise against the signal's abort event, or wrap the whole
request/parse sequence in one abortable helper. src/lib/api-timeout.test.ts
currently only covers a stalled headers phase; add a stalled-body case.
Activity
Gentle842 commentedon Nov 21, 2026
@Gentle842 has applied to work on this issue as part of the Stellar Wave Program's 11th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Gentle842 to this issue.
hameedx01 commentedon Nov 25, 2026
@hameedx01 has applied to work on this issue as part of the Stellar Wave Program's 11th wave.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @hameedx01 to this issue.