diff --git a/src/app/~gitbook/image/route.ts b/src/app/~gitbook/image/route.ts index 232d4505c..4a13055cd 100644 --- a/src/app/~gitbook/image/route.ts +++ b/src/app/~gitbook/image/route.ts @@ -64,6 +64,10 @@ export async function GET(request: NextRequest) { try { const response = await resizeImage(url, options); + if (!response.ok) { + throw new Error('Failed to resize image'); + } + return response; } catch (error) { // Redirect to the original image if resizing fails