From 3a0c2a77b1a6626699514ddaf8135f4397175443 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 2 May 2023 13:51:06 +0200 Subject: Enable external plugins to test the PR --- shared/server-commands/requests/requests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shared/server-commands/requests/requests.ts') diff --git a/shared/server-commands/requests/requests.ts b/shared/server-commands/requests/requests.ts index 96f67b4c7..e3f1817f1 100644 --- a/shared/server-commands/requests/requests.ts +++ b/shared/server-commands/requests/requests.ts @@ -159,7 +159,7 @@ function unwrapBodyOrDecodeToJSON (test: request.Test): Promise { try { return JSON.parse(new TextDecoder().decode(res.body)) } catch (err) { - console.error('Cannot decode JSON.', res.body instanceof Buffer ? res.body.toString() : res.body) + console.error('Cannot decode JSON.', { res, body: res.body instanceof Buffer ? res.body.toString() : res.body }) throw err } } @@ -168,7 +168,7 @@ function unwrapBodyOrDecodeToJSON (test: request.Test): Promise { try { return JSON.parse(res.text) } catch (err) { - console.error('Cannot decode json', res.text) + console.error('Cannot decode json', { res, text: res.text }) throw err } } -- cgit v1.2.3