add a more clear message for protocol errors

This commit is contained in:
Andrey Lushnikov 2017-07-05 17:21:42 -07:00
parent 0d2c32e8cd
commit 4fb7f7754c

View File

@ -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 {