ITADN

Constructing a response with an empty ReadableStream

#1384ClosedTartanLlama 创建于 2026-03-25
T
TartanLlamacommented
``` async function handleRequest() { const response = await fetch(/* */); // returns a 304 with empty response body return new Response(response.body, { status: response.status, statusText: response.statusText, headers: response.headers, }); } ``` Causes this error to be thrown: ``` Error while running request handler: Response constructor: Response body is given with a null body status. ```
关闭于 2026-04-10 3 条评论