Fix handling of fetch errors

Testing:
- delete the pdf file while the initial request is inflight
- delete the pdf file after the initial request has finished

Repeat for a small file and large file, exercising both one-off and
 chunked transports.
This commit is contained in:
Jakob Ackermann 2021-07-02 17:36:34 +01:00
parent ada283cc35
commit 291ffd3059
No known key found for this signature in database
GPG key ID: 30C56800FCA3828A
2 changed files with 4 additions and 11 deletions

View file

@ -247,12 +247,7 @@ class PDFFetchStreamRangeReader {
this._readCapability.resolve();
this._reader = response.body.getReader();
})
.catch(reason => {
if (reason?.name === "AbortError") {
return;
}
throw reason;
});
.catch(this._readCapability.reject);
this.onProgress = null;
}