Skip to content

Commit a1ed7f2

Browse files
jasnelldanielleadams
authored andcommitted
lib: propagate abortsignal reason in new AbortError constructor in blob
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #41008 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 6eda874 commit a1ed7f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/blob.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class Blob {
290290

291291
job.ondone = (err, ab) => {
292292
if (err !== undefined)
293-
return reject(new AbortError());
293+
return reject(new AbortError(undefined, { cause: err }));
294294
resolve(ab);
295295
};
296296
this[kArrayBufferPromise] =

0 commit comments

Comments
 (0)