fix: errorHandler 记录未预期错误日志,避免生产环境异常被静默吞掉
This commit is contained in:
parent
58db7d6063
commit
e4e0a026a8
@ -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,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user