We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 225b510 commit 53bf9ccCopy full SHA for 53bf9cc
1 file changed
index.js
@@ -76,7 +76,6 @@ class MulticraftAPI {
76
return crypto.createHmac('sha256', this.key).update(signature).digest('hex');
77
}
78
79
- // TODO cleanup errors
80
_call(method, params) {
81
// convert to object
82
params = params.reduce((p, v) => {
@@ -93,7 +92,7 @@ class MulticraftAPI {
93
92
form: params
94
});
95
const data = JSON.parse(res.body);
96
- if (!data.success) return reject(res);
+ if (!data.success) return reject(data);
97
resolve(data);
98
})
99
0 commit comments