From 36dd39dec0eaa9acdf0c749f4969a59bfd0f8c4a Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sun, 28 Nov 2021 12:54:47 -0800 Subject: [PATCH] lib: propagate abortsignal reason in new AbortError constructor in blob Signed-off-by: James M Snell PR-URL: https://github.com/nodejs/node/pull/41008 Reviewed-By: Ruben Bridgewater Reviewed-By: Robert Nagy Reviewed-By: Benjamin Gruenbaum --- lib/internal/blob.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/blob.js b/lib/internal/blob.js index 6607eccf490980..7c1da74beea9d3 100644 --- a/lib/internal/blob.js +++ b/lib/internal/blob.js @@ -292,7 +292,7 @@ class Blob { job.ondone = (err, ab) => { if (err !== undefined) - return reject(new AbortError()); + return reject(new AbortError(undefined, { cause: err })); resolve(ab); }; this[kArrayBufferPromise] =