We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1942d22 commit 77d6cb7Copy full SHA for 77d6cb7
packages/gitbook/src/routes/image.ts
@@ -107,13 +107,13 @@ export async function serveResizedImage(
107
try {
108
const response = await resizeImage(url, options);
109
if (!response.ok) {
110
- throw new Error('Failed to resize image');
+ throw new Error(`Failed to resize image, received status code ${response.status}`);
111
}
112
113
return response;
114
} catch (error) {
115
// Redirect to the original image if resizing fails
116
- console.error('Failed to resize image', error);
+ console.warn('Error while resizing image, redirecting to original', error);
117
return NextResponse.redirect(url, 302);
118
119
0 commit comments