From 9dfe472674502677a48fc57a9698463c7350c6ec Mon Sep 17 00:00:00 2001 From: Navy Date: Fri, 14 Aug 2020 17:12:53 +0300 Subject: [PATCH] fixed an issue with error showing [object Object] instead of actual error --- middleware/Shard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/Shard.js b/middleware/Shard.js index 3c6d794..50e721a 100644 --- a/middleware/Shard.js +++ b/middleware/Shard.js @@ -138,7 +138,7 @@ class Shard extends EventEmitter { if(!message || message._eval !== script) return; child.removeListener('message', listener); this._evals.delete(script); - if(!message._error) resolve(message._result); else reject(new Error(message._error)); + if(!message._error) resolve(message._result); else reject(new Error(message._error.stack)); }; child.on('message', listener);