diff options
author | Florian Dold <florian@dold.me> | 2022-01-10 01:19:19 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-01-10 01:19:19 +0100 |
commit | a2591a29afe004986126a4a46a430114923d9251 (patch) | |
tree | 1f235dc037cfa3bb2d60388a9c4ff0d813f63942 /packages/taler-wallet-cli | |
parent | a7b89247e41c272027d9c90a13c9a76901019daa (diff) |
logging, bump version
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r-- | packages/taler-wallet-cli/package.json | 2 | ||||
-rw-r--r-- | packages/taler-wallet-cli/src/harness/harness.ts | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/packages/taler-wallet-cli/package.json b/packages/taler-wallet-cli/package.json index 5ad34c4c9..4f8952035 100644 --- a/packages/taler-wallet-cli/package.json +++ b/packages/taler-wallet-cli/package.json @@ -1,6 +1,6 @@ { "name": "@gnu-taler/taler-wallet-cli", - "version": "0.9.0-dev.1", + "version": "0.9.0-dev.2", "description": "", "engines": { "node": ">=0.12.0" diff --git a/packages/taler-wallet-cli/src/harness/harness.ts b/packages/taler-wallet-cli/src/harness/harness.ts index 07e298520..040bd5a6f 100644 --- a/packages/taler-wallet-cli/src/harness/harness.ts +++ b/packages/taler-wallet-cli/src/harness/harness.ts @@ -2035,13 +2035,19 @@ export class WalletCli { JSON.stringify(payload), )}`, ); + console.log("--- wallet core response ---"); console.log(resp); - const ar = JSON.parse(resp) as CoreApiResponse; + console.log("--- end of response ---"); + let ar: any; + try { + ar = JSON.parse(resp) as CoreApiResponse; + } catch (e) { + throw new Error("wallet CLI did not return a proper JSON response"); + } if (ar.type === "error") { throw new OperationFailedError(ar.error); - } else { - return ar.result; } + return ar.result; }, }; } |