From 332745862e728dc5e79a424698b2736c4f2683bf Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 14 Mar 2022 18:31:30 +0100 Subject: wallet: towards db-less benchmarking, some refactoring --- packages/taler-wallet-core/src/util/http.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'packages/taler-wallet-core/src/util') diff --git a/packages/taler-wallet-core/src/util/http.ts b/packages/taler-wallet-core/src/util/http.ts index 3a7062c99..43fe29bba 100644 --- a/packages/taler-wallet-core/src/util/http.ts +++ b/packages/taler-wallet-core/src/util/http.ts @@ -34,6 +34,7 @@ import { timestampMax, TalerErrorDetails, Codec, + j2s, } from "@gnu-taler/taler-util"; import { TalerErrorCode } from "@gnu-taler/taler-util"; @@ -131,6 +132,11 @@ export async function readTalerErrorResponse( const errJson = await httpResponse.json(); const talerErrorCode = errJson.code; if (typeof talerErrorCode !== "number") { + logger.warn( + `malformed error response (status ${httpResponse.status}): ${j2s( + errJson, + )}`, + ); throw new OperationFailedError( makeErrorDetails( TalerErrorCode.WALLET_RECEIVED_MALFORMED_RESPONSE, -- cgit v1.2.3