From a437605ebaf4267e60ae26f50ac107cdf11a8876 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 12 Sep 2023 08:52:14 +0200 Subject: taler-util: check status of merchant instances list response --- packages/taler-util/src/MerchantApiClient.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/taler-util/src') diff --git a/packages/taler-util/src/MerchantApiClient.ts b/packages/taler-util/src/MerchantApiClient.ts index cbdcb9fdf..ccbbf79b3 100644 --- a/packages/taler-util/src/MerchantApiClient.ts +++ b/packages/taler-util/src/MerchantApiClient.ts @@ -14,6 +14,7 @@ GNU Taler; see the file COPYING. If not, see */ +import { codecForAny } from "./codec.js"; import { createPlatformHttpLib, expectSuccessResponseOrThrow, @@ -221,7 +222,7 @@ export class MerchantApiClient { const resp = await this.httpClient.fetch(url.href, { headers: this.makeAuthHeader(), }); - return resp.json(); + return readSuccessResponseJsonOrThrow(resp, codecForAny()); } async getInstanceFullDetails(instanceId: string): Promise { -- cgit v1.2.3