Description
fetch(url) can reject with a TypeError for network-level failures (no internet, DNS failure, ECONNREFUSED to devnet). The current code only handles HTTP status codes — network rejections propagate as raw TypeError: fetch failed with no context about which contract or network was being fetched.
Location
src/fetcher.ts:34 — const response = await fetch(url);
Suggested fix
let response: Response;
try {
response = await fetch(url);
} catch (cause) {
throw new Error(
`Network error fetching ABI for ${address}.${name} on ${network}`,
{ cause },
);
}
Description
fetch(url)can reject with aTypeErrorfor network-level failures (no internet, DNS failure, ECONNREFUSED to devnet). The current code only handles HTTP status codes — network rejections propagate as rawTypeError: fetch failedwith no context about which contract or network was being fetched.Location
src/fetcher.ts:34—const response = await fetch(url);Suggested fix