diff --git a/app/(chat)/api/chat/route.ts b/app/(chat)/api/chat/route.ts index 98da4a1..63827cb 100644 --- a/app/(chat)/api/chat/route.ts +++ b/app/(chat)/api/chat/route.ts @@ -140,7 +140,7 @@ export async function POST(request: Request) { titleError.message?.includes('No authentication provided') || titleError.message?.includes('AI Gateway requires a valid credit card')) ) { - return new ChatSDKError('bad_request:activate_gateway').toResponse(); + throw titleError; } console.warn('Title generation failed, using default:', titleError); }