Fix nested try-catch structure in checkout route
Add missing catch and closing brace for outer try block. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
b7ad243941
commit
24a20d0caa
@@ -153,4 +153,8 @@ export async function POST(req: Request) {
|
||||
console.error('Returning error to client:', message);
|
||||
return NextResponse.json({ error: message }, { status: 500 });
|
||||
}
|
||||
} catch (err) {
|
||||
const message = err instanceof Error ? err.message : 'Something went wrong.';
|
||||
return NextResponse.json({ error: message }, { status: 500 });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user