We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e755c13 commit ad6284fCopy full SHA for ad6284f
bin/stratum-notify
100644
100755
lib/client.js
@@ -77,7 +77,11 @@ module.exports = function (classes){
77
78
if (_.has(command, 'error') && (!_.isNull(command['error']) && !_.isEmpty(command['error']))) {
79
// we have an error, we need to act on that, regardless of other members in the command received
80
- throw new Error(command);
+ throw Object.assign(new Error(command.error[1]), {
81
+ stratum_code: command.error[0],
82
+ stack: command.error[2],
83
+ id: command.id
84
+ });
85
} else if (_.has(command, 'id') && _.isNull(command['id'])) {
86
// null id, it's a broadcast most likely, we need to check the last command
87
if (_.has(command, 'method')) {
0 commit comments