From 021d59dd03b4815229a6abfed89b07c40809487e Mon Sep 17 00:00:00 2001 From: Alexandru Pasare Date: Sat, 4 Sep 2021 15:27:23 +0300 Subject: [PATCH] bug: fix uncatchable thrown errror this is aiming to fix the error: `Uncaught (in promise) Error`, generated by the fact that it is impossible to catch the error that is thrown by the helloMessage promise --- also, that thrown seems unneeded, emitting the error should be enough in this context. --- lib/bus.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/bus.js b/lib/bus.js index 5d679eb..a88e1ae 100644 --- a/lib/bus.js +++ b/lib/bus.js @@ -173,7 +173,6 @@ class MessageBus extends EventEmitter { }) .catch((err) => { this.emit('error', err); - throw new Error(err); }); }