From a7c76e03e5174b4c80735ff654f3c9ff005d63df Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Thu, 25 Jul 2024 11:14:26 +0800 Subject: [PATCH] Improve failed ETag error message [#427] (#428) * Improve failed ETag error message [#427] --- js/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/index.ts b/js/index.ts index 3d5a43e..9d83c78 100644 --- a/js/index.ts +++ b/js/index.ts @@ -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) {