commit d5fae1b24b8275c60e35ff943e8cf5439d109f7e
parent 34b27ec7501b4267d9d1439b610926f20885bd2c
Author: Florian Dold <florian@dold.me>
Date: Wed, 15 Jul 2026 18:31:25 +0200
wallet-core: improve /keys error handling
Diffstat:
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/packages/taler-wallet-core/src/exchanges.ts b/packages/taler-wallet-core/src/exchanges.ts
@@ -839,6 +839,18 @@ async function downloadExchangeKeysInfo(
logger.trace("got response to /keys request");
+ if (resp.status !== 200) {
+ throw TalerError.fromDetail(
+ TalerErrorCode.WALLET_UNEXPECTED_REQUEST_ERROR,
+ {
+ requestUrl: resp.requestUrl,
+ requestMethod: resp.requestMethod,
+ httpStatusCode: resp.status,
+ },
+ "Unexpected response status",
+ );
+ }
+
// We must make sure to parse out the protocol version
// before we validate the body.
// Otherwise the parser might complain with a hard to understand