Skip to content

Commit

Permalink
Fix: fetcher error catching improvement (#3470)
Browse files Browse the repository at this point in the history
Fix for #3466
  • Loading branch information
mulhoon authored Jan 7, 2024
1 parent 22e39e9 commit c10cad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function fetchBlob(
// Fetch the resource
const response = await fetch(url, requestInit)

if (!response.ok) {
if (response.status >= 400) {
throw new Error(`Failed to fetch ${url}: ${response.status} (${response.statusText})`)
}

Expand Down

0 comments on commit c10cad2

Please sign in to comment.