zen: error logging

This commit is contained in:
Frank 2026-03-17 16:53:08 -04:00
parent 7daea69e13
commit fbabc97c4c

View File

@ -330,6 +330,7 @@ export async function handler(
logger.metric({ logger.metric({
"error.type": error.constructor.name, "error.type": error.constructor.name,
"error.message": error.message, "error.message": error.message,
"error.cause": error.cause?.toString(),
}) })
// Note: both top level "type" and "error.type" fields are used by the @ai-sdk/anthropic client to render the error message. // Note: both top level "type" and "error.type" fields are used by the @ai-sdk/anthropic client to render the error message.