Skip to content

Commit

Permalink
fix: avoid potentially outputting very large JSON objects (#5147)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-luong committed Apr 3, 2024
1 parent e06a383 commit 84b5e8b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/lib/request/request.ts
Expand Up @@ -143,13 +143,10 @@ export async function makeRequest(

return new Promise((resolve, reject) => {
needle.request(method, url, data, options, (err, res, respBody) => {
debug(err);
debug(
'response (%s): ',
(res || {}).statusCode,
jsonStringifyLargeObject(respBody),
);
// respBody potentially very large, do not output it in debug
debug('response (%s)', (res || {}).statusCode);
if (err) {
debug('response err: %s', err);
return reject(err);
}

Expand Down

0 comments on commit 84b5e8b

Please sign in to comment.