mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
Cherry-picked: Reject only with Error instead of Object or String Fixes #132
This commit is contained in:
parent
6d30457722
commit
62723d85f0
2 changed files with 2 additions and 2 deletions
|
|
@ -80,7 +80,7 @@ class Nadeo extends Core {
|
|||
|
||||
const sentPromise = new Promise(async (resolve,reject) => {
|
||||
client.methodCall(cmd, params, (err, value) => {
|
||||
if (err) reject('XMLRPC error ' + JSON.stringify(err));
|
||||
if (err) reject(new Error('XMLRPC error ' + JSON.stringify(err)));
|
||||
resolve(value);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue