Skip to content

Commit

Permalink
Merge branch 'main' into friendlymatthew-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
friendlymatthew authored Mar 4, 2024
2 parents 41e3fb4 + e3fd13f commit 569753d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/range-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ export async function requestRanges(
} else {
throw new Error(`Unexpected response format: ${contentType}`);
}
case 416:
const requestedRange = response.headers.get("Range") || rangesHeader;
throw new Error(
`Resolver cannot serve the requested ranges: ${requestedRange}`,
);
default:
throw new Error(`Expected 206 or 200 response, got ${response.status}`);
}
Expand Down

0 comments on commit 569753d

Please sign in to comment.