We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2a3d91 commit 1aab97aCopy full SHA for 1aab97a
web/src/app/api/v1/chat/completions/_post.ts
@@ -325,8 +325,12 @@ export async function postChatCompletions(params: {
325
return NextResponse.json(result)
326
}
327
} catch (error) {
328
+ let openrouterError: OpenRouterError | undefined
329
+ if (error instanceof OpenRouterError) {
330
+ openrouterError = error
331
+ }
332
logger.error(
- { error: getErrorObject(error), body },
333
+ { error: getErrorObject(error), body, openrouterError: openrouterError?.toJSON() },
334
'Error with OpenRouter request',
335
)
336
trackEvent({
0 commit comments