commit 979a47093c5117d5ae8a4fcd4851ad1f5b1d9fbe
parent 58ddc54ebc0b6671413ac119176091c74184f59b
Author: Florian Dold <florian@dold.me>
Date: Sun, 30 Jun 2024 18:58:50 +0200
-logging
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/packages/taler-util/src/http-client/bank-integration.ts b/packages/taler-util/src/http-client/bank-integration.ts
@@ -18,6 +18,7 @@ import { HttpRequestLibrary, readTalerErrorResponse } from "../http-common.js";
import { HttpStatusCode } from "../http-status-codes.js";
import { createPlatformHttpLib } from "../http.js";
import { LibtoolVersion } from "../libtool-version.js";
+import { Logger } from "../logging.js";
import {
FailCasesByMethod,
ResultByMethod,
@@ -46,6 +47,8 @@ export type TalerBankIntegrationErrorsByMethod<
prop extends keyof TalerBankIntegrationHttpClient,
> = FailCasesByMethod<TalerBankIntegrationHttpClient, prop>;
+const logger = new Logger("bank-integration.ts");
+
/**
* The API is used by the wallets.
*/
@@ -81,6 +84,7 @@ export class TalerBankIntegrationHttpClient {
case HttpStatusCode.Ok:
return opSuccessFromHttp(resp, codecForIntegrationBankConfig());
default:
+ logger.warn(`config request failed, status ${resp.status}`)
return opUnknownFailure(resp, await readTalerErrorResponse(resp));
}
}