Files
supabase/apps/studio/scripts
Alaister Young 0bd9f1bb2d fix(studio/serve): pipe Response body via Readable.fromWeb
`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.
2026-05-17 23:44:34 +08:00
..