fix(routes): /raw/{pasteId} no longer returns a body on error

This commit is contained in:
2026-03-08 14:58:56 -04:00
parent ec0635dd3b
commit 38c8af1c57
@@ -7,7 +7,10 @@ export const GET: RequestHandler = async ({ params }) => {
const res = await fetch(`${apiUrl}/api/paste/${id}/raw`); const res = await fetch(`${apiUrl}/api/paste/${id}/raw`);
if (res.status === 404) { if (res.status === 404) {
return new Response('Paste not found', { status: 404 }); return new Response(null, {
status: 404,
statusText: 'Not Found'
});
} }
const content = await res.text(); const content = await res.text();
return new Response(content, { return new Response(content, {