fix: errorHandler 记录未预期错误日志,避免生产环境异常被静默吞掉
Some checks failed
CI/CD Pipeline / Code Quality (push) Failing after 21s
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Has been skipped

This commit is contained in:
Wang Zhuoxuan 2026-06-03 10:39:22 +08:00
parent 58db7d6063
commit e4e0a026a8

View File

@ -77,7 +77,9 @@ export function errorHandler(
return; return;
} }
// Unexpected errors // Unexpected errors — log full details for debugging
_request.log.error({ err: error }, 'Unhandled error');
reply.status(500).send({ reply.status(500).send({
success: false, success: false,
data: null, data: null,