js -> ts
This commit is contained in:
@@ -263,7 +263,8 @@ export async function GET({ request }) {
|
||||
return proxyResponse;
|
||||
|
||||
} catch (err) {
|
||||
console.error('[image-proxy] Error fetching image:', err.message);
|
||||
const message = err instanceof Error ? err.message : String(err);
|
||||
console.error('[image-proxy] Error fetching image:', message);
|
||||
return new Response('Failed to fetch image', { status: 500 });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user