fix: close browser session lifecycle gaps

This commit is contained in:
Wenxin Duan
2026-09-08 11:12:12 +08:00
parent 8fa006344d
commit ba45382747
12 changed files with 149 additions and 11 deletions
+3
View File
@@ -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: {} };
}