X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fserver-commands%2Frequests%2Frequests.ts;h=e3f1817f1b45c934599f9905b2a2e8fb7a028905;hb=HEAD;hp=96f67b4c7fbc1e0973c0b3cc8806619491c6cd98;hpb=d102de1b38f2877463529c3b27bd35ffef4fd8bf;p=github%2FChocobozzz%2FPeerTube.git 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 } }