Skip to content

Commit

Permalink
vision bois
Browse files Browse the repository at this point in the history
  • Loading branch information
cdreetz committed Sep 5, 2024
1 parent bee7ff8 commit 417426d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/api/image/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export async function POST(req: Request) {
return NextResponse.json(data);
} catch (error) {
console.error('Error processing image:', error);
return NextResponse.json({ error: 'Error processing image', details: error.message }, { status: 500 });
if (error instanceof Error) {
return NextResponse.json({ error: 'Error processing image', details: error.message }, { status: 500 });
} else {
return NextResponse.json({ error: 'Error processing image', details: 'An unknown error occurred' }, { status: 500 });
}
}
}

0 comments on commit 417426d

Please sign in to comment.