Reject oversized replay payloads and chunk recorder flushes

This commit is contained in:
Mike Cao committed 2026-06-10 23:18:50 -07:00
1 parent 1118f4b28e
commit 475d9548de
3 files changed
+121 -17

No files matched your search

+9
View File
@@ -36,6 +36,15 @@ export function forbidden(error?: Record<string, any>) {
);
}
export function payloadTooLarge(error?: Record<string, any>) {
return Response.json(
{
error: { message: 'Payload too large', code: 'payload-too-large', status: 413, ...error },
},
{ status: 413 },
);
}
export function notFound(error?: Record<string, any>) {
return Response.json(
{ error: { message: 'Not found', code: 'not-found', status: 404, ...error } },