diff --git a/src/fetcher.ts b/src/fetcher.ts index ce4e3670a..db7435d7d 100644 --- a/src/fetcher.ts +++ b/src/fetcher.ts @@ -40,6 +40,10 @@ async function fetchBlob( // Fetch the resource const response = await fetch(url, requestInit) + if (!response.ok) { + throw new Error(`Failed to fetch ${url}: ${response.status} (${response.statusText})`) + } + // Read the data to track progress watchProgress(response.clone(), progressCallback)