Skip to content

Commit

Permalink
Improve failed ETag error message [#427] (#428)
Browse files Browse the repository at this point in the history
* Improve failed ETag error message [#427]
  • Loading branch information
bdon authored Jul 25, 2024
1 parent 0f9009e commit a7c76e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,9 @@ export class FetchSource implements Source {
// some storage systems are misbehaved (Cloudflare R2)
if (resp.status === 416 || (etag && newEtag && newEtag !== etag)) {
this.mustReload = true;
throw new EtagMismatch(etag);
throw new EtagMismatch(
`Server returned non-matching ETag ${etag} after one retry. Check browser extensions and servers for issues that may affect correct ETag headers.`
);
}

if (resp.status >= 300) {
Expand Down

0 comments on commit a7c76e0

Please sign in to comment.