We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bcbbd03 + 1b720a4 commit 6537e64Copy full SHA for 6537e64
src/display/fetch_stream.js
@@ -243,13 +243,20 @@ class PDFFetchStreamRangeReader {
243
this._withCredentials,
244
this._abortController
245
)
246
- ).then(response => {
247
- if (!validateResponseStatus(response.status)) {
248
- throw createResponseStatusError(response.status, url);
249
- }
250
- this._readCapability.resolve();
251
- this._reader = response.body.getReader();
252
- });
+ )
+ .then(response => {
+ if (!validateResponseStatus(response.status)) {
+ throw createResponseStatusError(response.status, url);
+ }
+ this._readCapability.resolve();
+ this._reader = response.body.getReader();
253
+ })
254
+ .catch(reason => {
255
+ if (reason && reason.name === "AbortError") {
256
+ return;
257
258
+ throw reason;
259
+ });
260
261
this.onProgress = null;
262
}
0 commit comments