Only provide the error message as a reason for now

master
Sven Slootweg 4 years ago
parent 31faf96fe7
commit 92ee209de2

@ -59,7 +59,8 @@ module.exports = function simpleSource(_options) {
if (errorReason === true) { if (errorReason === true) {
throw new Aborted("Stream was aborted"); throw new Aborted("Stream was aborted");
} else if (errorReason instanceof Error) { } 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 { } else {
return onRequest(); return onRequest();

Loading…
Cancel
Save