aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/requests
diff options
context:
space:
mode:
Diffstat (limited to 'shared/server-commands/requests')
-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 }