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();