fix: close browser session lifecycle gaps
This commit is contained in:
@@ -40,6 +40,9 @@ function mapError(error: FastifyError | Error): {
|
||||
if ("statusCode" in error && error.statusCode === 413) {
|
||||
return { statusCode: 413, code: "PAYLOAD_TOO_LARGE", message: "Request payload is too large", details: {} };
|
||||
}
|
||||
if ("statusCode" in error && error.statusCode === 400) {
|
||||
return { statusCode: 400, code: "INVALID_REQUEST_BODY", message: "Request body could not be processed", details: {} };
|
||||
}
|
||||
return { statusCode: 500, code: "INTERNAL_ERROR", message: "Internal server error", details: {} };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user