nervepay 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/nervepay-cli.js +10 -2
- package/package.json +1 -1
package/bin/nervepay-cli.js
CHANGED
|
@@ -465,8 +465,12 @@ async function deviceNodePairing(options) {
|
|
|
465
465
|
};
|
|
466
466
|
ws.send(JSON.stringify(pairReq));
|
|
467
467
|
} else {
|
|
468
|
-
|
|
468
|
+
const errDetail = typeof frame.error === 'object'
|
|
469
|
+
? JSON.stringify(frame.error)
|
|
470
|
+
: (frame.error || 'Unknown error');
|
|
471
|
+
lastError = `Connect rejected: ${errDetail}`;
|
|
469
472
|
console.error(chalk.red(` ${lastError}`));
|
|
473
|
+
if (frame.payload) console.error(chalk.gray(' Payload:'), JSON.stringify(frame.payload));
|
|
470
474
|
ws.close();
|
|
471
475
|
settle(reject, new Error(lastError));
|
|
472
476
|
}
|
|
@@ -482,8 +486,12 @@ async function deviceNodePairing(options) {
|
|
|
482
486
|
console.log(chalk.gray(` Approve with: openclaw devices approve ${requestId}`));
|
|
483
487
|
console.log(chalk.gray(` Timeout: ${options.timeout}s\n`));
|
|
484
488
|
} else {
|
|
485
|
-
|
|
489
|
+
const errDetail = typeof frame.error === 'object'
|
|
490
|
+
? JSON.stringify(frame.error)
|
|
491
|
+
: (frame.error || 'Unknown error');
|
|
492
|
+
lastError = `Pair request rejected: ${errDetail}`;
|
|
486
493
|
console.error(chalk.red(` ${lastError}`));
|
|
494
|
+
if (frame.payload) console.error(chalk.gray(' Payload:'), JSON.stringify(frame.payload));
|
|
487
495
|
ws.close();
|
|
488
496
|
settle(reject, new Error(lastError));
|
|
489
497
|
}
|