diff --git a/app/routes/j/$id.tsx b/app/routes/j/$id.tsx index 2d02bb1..fcb4d1e 100644 --- a/app/routes/j/$id.tsx +++ b/app/routes/j/$id.tsx @@ -48,6 +48,10 @@ export const loader: LoaderFunction = async ({ params, request }) => { const jsonResponse = await safeFetch(doc.url); if (!jsonResponse.ok) { + console.log( + `Failed to fetch ${doc.url}: ${jsonResponse.status} (${jsonResponse.statusText})` + ); + throw new Response(jsonResponse.statusText, { status: jsonResponse.status, }); @@ -55,6 +59,8 @@ export const loader: LoaderFunction = async ({ params, request }) => { const json = await jsonResponse.json(); + console.log(`Fetched ${doc.url} with json, returning...`); + return { doc, json,