From 92ee209de22392b350d24698d2e805bb0e8be60d Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sat, 26 Sep 2020 22:00:34 +0200 Subject: [PATCH] Only provide the error message as a reason for now --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index da8d0be..7e5d212 100644 --- a/index.js +++ b/index.js @@ -59,7 +59,8 @@ module.exports = function simpleSource(_options) { if (errorReason === true) { throw new Aborted("Stream was aborted"); } else if (errorReason instanceof Error) { - throw new Aborted(`Stream was aborted due to error: ${errorReason.message}`, {reason: errorReason}); + // FIXME: Pass in full error, after changing to a different error type implementation that accepts error objects as extra properties + throw new Aborted(`Stream was aborted due to error: ${errorReason.message}`, {reason: errorReason.message}); } } else { return onRequest();