fix: add debug logging for ai streaming (#2275)

This commit is contained in:
Lucas Smith
2025-12-04 10:03:29 +11:00
committed by GitHub
parent f70e6ac50a
commit 2ee6b90c99
2 changed files with 8 additions and 0 deletions
@@ -116,6 +116,10 @@ export const detectFieldsRoute = new Hono<HonoEnv>().post(
clearInterval(interval);
}
// The logger below it stringifies the error, using `console.error`
// to attempt to get a stack trace
console.error(error);
logger.error({
event: 'ai.detect-fields.error',
error,
@@ -114,6 +114,10 @@ export const detectRecipientsRoute = new Hono<HonoEnv>().post(
clearInterval(interval);
}
// The logger below it stringifies the error, using `console.error`
// to attempt to get a stack trace
console.error(error);
logger.error({
event: 'ai.detect-recipients.error',
error,