better logging

This commit is contained in:
Florian Dold 2021-04-08 16:31:43 +02:00
parent b2edad2dac
commit 15cecf126a
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 4 additions and 3 deletions

View File

@ -1189,7 +1189,7 @@ export interface MerchantServiceInterface {
export class MerchantApiClient { export class MerchantApiClient {
constructor( constructor(
private baseUrl: string, private baseUrl: string,
private auth: MerchantAuthConfiguration, public readonly auth: MerchantAuthConfiguration,
) {} ) {}
async changeAuth(auth: MerchantAuthConfiguration): Promise<void> { async changeAuth(auth: MerchantAuthConfiguration): Promise<void> {

View File

@ -122,7 +122,9 @@ export async function runMerchantInstancesTest(t: GlobalTestState) {
// Now this should fail, as we didn't change the auth of the client yet. // Now this should fail, as we didn't change the auth of the client yet.
const exc = await t.assertThrowsAsync(async () => { const exc = await t.assertThrowsAsync(async () => {
await merchantClient.getInstances(); console.log("requesting instances with auth", merchantClient.auth);
const resp = await merchantClient.getInstances();
console.log("axios result:", resp);
}); });
t.assertAxiosError(exc); t.assertAxiosError(exc);
@ -137,7 +139,6 @@ export async function runMerchantInstancesTest(t: GlobalTestState) {
await merchantClient.getInstances(); await merchantClient.getInstances();
// Now, try some variations. // Now, try some variations.
{ {
const url = merchant.makeInstanceBaseUrl(); const url = merchant.makeInstanceBaseUrl();
const resp = await axios.get(new URL("private/instances", url).href, { const resp = await axios.get(new URL("private/instances", url).href, {