chore: add id (#1234)
This commit is contained in:
parent
947ed094a6
commit
fffb0e8897
1 changed files with 3 additions and 1 deletions
|
|
@ -286,6 +286,8 @@ export async function POST(request: Request) {
|
|||
|
||||
return new Response(stream.pipeThrough(new JsonToSseTransformStream()));
|
||||
} catch (error) {
|
||||
const vercelId = request.headers.get('x-vercel-id');
|
||||
|
||||
if (error instanceof ChatSDKError) {
|
||||
return error.toResponse();
|
||||
}
|
||||
|
|
@ -300,7 +302,7 @@ export async function POST(request: Request) {
|
|||
return new ChatSDKError("bad_request:activate_gateway").toResponse();
|
||||
}
|
||||
|
||||
console.error("Unhandled error in chat API:", error);
|
||||
console.error("Unhandled error in chat API:", error, { vercelId });
|
||||
return new ChatSDKError("offline:chat").toResponse();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue