From 4fb7f7754c179f6292edf78832d43da9a661ce82 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 5 Jul 2017 17:21:42 -0700 Subject: [PATCH] add a more clear message for protocol errors --- lib/Connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Connection.js b/lib/Connection.js index fa52efc9..600b0602 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -61,7 +61,7 @@ class Connection extends EventEmitter { let callback = this._callbacks.get(object.id); this._callbacks.delete(object.id); if (object.error) - callback.reject(new Error(`Protocol error (${callback.method}): ${object.error.message}`)); + callback.reject(new Error(`Protocol error (${callback.method}): ${object.error.message} ${object.error.data}`)); else callback.resolve(object.result); } else {