diff --git a/frontend/app/api/proxy/[[...path]]/route.ts b/frontend/app/api/proxy/[[...path]]/route.ts index 75df245..0191ab6 100644 --- a/frontend/app/api/proxy/[[...path]]/route.ts +++ b/frontend/app/api/proxy/[[...path]]/route.ts @@ -31,7 +31,9 @@ async function handler( body, }); - const data = await res.arrayBuffer(); + // Per Fetch spec, Response with 204/205/304 must not have a body. + const hasBody = res.status !== 204 && res.status !== 205 && res.status !== 304; + const data = hasBody ? await res.arrayBuffer() : null; return new NextResponse(data, { status: res.status,