mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 11:25:06 +03:00
`for await (chunk of response.body)` works for simple responses but can leave the web ReadableStream in a "disturbed/locked" state when the TanStack Start handler peeks at the body internally, surfacing on the next request as TypeError: Response body object should not be disturbed or locked Switch to `Readable.fromWeb(response.body).pipe(res)` so the stream is consumed via Node's stream machinery with backpressure and proper cleanup. Resolves the Promise on `res.close`/`finish` and propagates errors from either end.