taler-util: check status of merchant instances list response

This commit is contained in:
Florian Dold 2023-09-12 08:52:14 +02:00
parent dceae7e688
commit a437605eba
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
3 changed files with 3 additions and 3 deletions

@ -1 +1 @@
Subproject commit 001f5dd081fc8729ff8def90c4a1c3f93eb8689a Subproject commit 23538677f6c6be2a62f38dc6137ecdd1c76b7b15

View File

@ -193,7 +193,6 @@ export async function runMerchantInstancesTest(t: GlobalTestState) {
}); });
console.log(exc); console.log(exc);
t.assertTrue(exc.errorDetail.httpStatusCode === 401); t.assertTrue(exc.errorDetail.httpStatusCode === 401);
t.assertDeepEqual(exc.response?.status, 401);
} }
} }

View File

@ -14,6 +14,7 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/ */
import { codecForAny } from "./codec.js";
import { import {
createPlatformHttpLib, createPlatformHttpLib,
expectSuccessResponseOrThrow, expectSuccessResponseOrThrow,
@ -221,7 +222,7 @@ export class MerchantApiClient {
const resp = await this.httpClient.fetch(url.href, { const resp = await this.httpClient.fetch(url.href, {
headers: this.makeAuthHeader(), headers: this.makeAuthHeader(),
}); });
return resp.json(); return readSuccessResponseJsonOrThrow(resp, codecForAny());
} }
async getInstanceFullDetails(instanceId: string): Promise<any> { async getInstanceFullDetails(instanceId: string): Promise<any> {