diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-08-24 11:52:12 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-08-24 11:52:12 +0530 |
commit | b1fd7d09a605558bc61ed113331e0e065e0e2681 (patch) | |
tree | 1c25c1f9620413149e44c628655781172c85508b /packages/taler-wallet-core/src/headless/NodeHttpLib.ts | |
parent | 1548086f50a7e33f17c5a5218fa0fc3383a8a2d5 (diff) | |
download | wallet-core-b1fd7d09a605558bc61ed113331e0e065e0e2681.tar.xz |
test case for order claiming; more accurate EC
Diffstat (limited to 'packages/taler-wallet-core/src/headless/NodeHttpLib.ts')
-rw-r--r-- | packages/taler-wallet-core/src/headless/NodeHttpLib.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/headless/NodeHttpLib.ts b/packages/taler-wallet-core/src/headless/NodeHttpLib.ts index 85f37cfa3..62ab9caf6 100644 --- a/packages/taler-wallet-core/src/headless/NodeHttpLib.ts +++ b/packages/taler-wallet-core/src/headless/NodeHttpLib.ts @@ -30,6 +30,9 @@ import Axios from "axios"; import { OperationFailedError, makeErrorDetails } from "../operations/errors"; import { TalerErrorCode } from "../TalerErrorCode"; import { URL } from "../util/url"; +import { Logger } from "../util/logging"; + +const logger = new Logger("NodeHttpLib.ts"); /** * Implementation of the HTTP request library interface for node. @@ -96,6 +99,7 @@ export class NodeHttpLib implements HttpRequestLibrary { try { responseJson = JSON.parse(respText); } catch (e) { + logger.trace(`invalid json: '${respText}'`); throw new OperationFailedError( makeErrorDetails( TalerErrorCode.WALLET_RECEIVED_MALFORMED_RESPONSE, @@ -109,6 +113,7 @@ export class NodeHttpLib implements HttpRequestLibrary { ); } if (responseJson === null || typeof responseJson !== "object") { + logger.trace(`invalid json (not an object): '${respText}'`); throw new OperationFailedError( makeErrorDetails( TalerErrorCode.WALLET_RECEIVED_MALFORMED_RESPONSE, |