]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/server-commands/requests/requests.ts
Enable external plugins to test the PR
[github/Chocobozzz/PeerTube.git] / shared / server-commands / requests / requests.ts
index 96f67b4c7fbc1e0973c0b3cc8806619491c6cd98..e3f1817f1b45c934599f9905b2a2e8fb7a028905 100644 (file)
@@ -159,7 +159,7 @@ function unwrapBodyOrDecodeToJSON <T> (test: request.Test): Promise<T> {
       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 <T> (test: request.Test): Promise<T> {
       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
       }
     }