aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-02 13:51:06 +0200
committerChocobozzz <chocobozzz@cpy.re>2023-05-09 08:57:34 +0200
commit3a0c2a77b1a6626699514ddaf8135f4397175443 (patch)
tree60bec7ef8e9cdc008b0a4a56aa403617d036bfab /shared/server-commands
parent9a3db678f56eda37d222cf2d2232ae0ef5d533d2 (diff)
downloadPeerTube-3a0c2a77b1a6626699514ddaf8135f4397175443.tar.gz
PeerTube-3a0c2a77b1a6626699514ddaf8135f4397175443.tar.zst
PeerTube-3a0c2a77b1a6626699514ddaf8135f4397175443.zip
Enable external plugins to test the PR
Diffstat (limited to 'shared/server-commands')
-rw-r--r--shared/server-commands/requests/requests.ts4
1 files changed, 2 insertions, 2 deletions
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 <T> (test: request.Test): Promise<T> {
159 try { 159 try {
160 return JSON.parse(new TextDecoder().decode(res.body)) 160 return JSON.parse(new TextDecoder().decode(res.body))
161 } catch (err) { 161 } catch (err) {
162 console.error('Cannot decode JSON.', res.body instanceof Buffer ? res.body.toString() : res.body) 162 console.error('Cannot decode JSON.', { res, body: res.body instanceof Buffer ? res.body.toString() : res.body })
163 throw err 163 throw err
164 } 164 }
165 } 165 }
@@ -168,7 +168,7 @@ function unwrapBodyOrDecodeToJSON <T> (test: request.Test): Promise<T> {
168 try { 168 try {
169 return JSON.parse(res.text) 169 return JSON.parse(res.text)
170 } catch (err) { 170 } catch (err) {
171 console.error('Cannot decode json', res.text) 171 console.error('Cannot decode json', { res, text: res.text })
172 throw err 172 throw err
173 } 173 }
174 } 174 }