From 6c7aa855cf73b09237e45b614d4db1601e637cd1 Mon Sep 17 00:00:00 2001 From: RainbowBird Date: Wed, 4 Mar 2026 00:40:02 +0800 Subject: [PATCH] feat(server): log api error --- apps/server/src/app.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/server/src/app.ts b/apps/server/src/app.ts index 736fa6ead..769bee525 100644 --- a/apps/server/src/app.ts +++ b/apps/server/src/app.ts @@ -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,