feat(server): log api error

This commit is contained in:
RainbowBird
2026-03-04 19:06:24 +08:00
parent f38871b2d8
commit 6c7aa855cf
+2
View File
@@ -51,6 +51,8 @@ function buildApp({ auth, characterService, chatService, providerService }: AppD
.use('*', bodyLimit({ maxSize: 1024 * 1024 }))
.onError((err, c) => {
if (err instanceof ApiError) {
logger.withError(err).warn('API error occurred')
return c.json({
error: err.errorCode,
message: err.message,