aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-09-12 08:52:14 +0200
committerFlorian Dold <florian@dold.me>2023-09-12 08:52:14 +0200
commita437605ebaf4267e60ae26f50ac107cdf11a8876 (patch)
tree84e701f12a7a3736ae1e6390bc9c27159f776335
parentdceae7e6885832f42596bc477e7d0af28522ce53 (diff)
taler-util: check status of merchant instances list response
m---------build-system/taler-build-scripts0
-rw-r--r--packages/taler-harness/src/integrationtests/test-merchant-instances.ts1
-rw-r--r--packages/taler-util/src/MerchantApiClient.ts3
3 files changed, 2 insertions, 2 deletions
diff --git a/build-system/taler-build-scripts b/build-system/taler-build-scripts
-Subproject 001f5dd081fc8729ff8def90c4a1c3f93eb8689
+Subproject 23538677f6c6be2a62f38dc6137ecdd1c76b7b1
diff --git a/packages/taler-harness/src/integrationtests/test-merchant-instances.ts b/packages/taler-harness/src/integrationtests/test-merchant-instances.ts
index fd7a8ca3a..27de8a0a0 100644
--- a/packages/taler-harness/src/integrationtests/test-merchant-instances.ts
+++ b/packages/taler-harness/src/integrationtests/test-merchant-instances.ts
@@ -193,7 +193,6 @@ export async function runMerchantInstancesTest(t: GlobalTestState) {
});
console.log(exc);
t.assertTrue(exc.errorDetail.httpStatusCode === 401);
- t.assertDeepEqual(exc.response?.status, 401);
}
}
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 <http://www.gnu.org/licenses/>
*/
+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<any> {