Reject oversized replay payloads and chunk recorder flushes
This commit is contained in:
1 parent
1118f4b28e
commit
475d9548de
3 files changed
+121
-17
No files matched your search
@@ -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 } },
|
||||
|
||||
Reference in new issue
Block a user