开启后端严格空值检查

This commit is contained in:
yml2213
2026-05-26 08:45:06 +08:00
parent 49ac82698f
commit 7aef1a6d50
21 changed files with 101 additions and 38 deletions
+2 -2
View File
@@ -45,8 +45,8 @@ export function buildErrorPayload(error: unknown, fallbackMessage: string) {
export function sendRouteError(
res: Response,
error: unknown,
fallbackMessage: string,
scope: string
fallbackMessage = "服务内部错误",
scope = "[route]"
): void {
const classification = classifyRouteError(error);
const logger = classification.statusCode >= 500 ? logError : logWarn;