Skip to content

Commit

Permalink
Merge pull request #1669 from snyk/fix/dont-fail-on-request-big-payload
Browse files Browse the repository at this point in the history
fix: don't fail on request's big payload
  • Loading branch information
admons committed Mar 2, 2021
2 parents 1228b55 + 47e106e commit 3f52bdc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/request/request.ts
Expand Up @@ -83,7 +83,11 @@ export = function makeRequest(
payload.timeout = config.timeout * 1000; // s -> ms
}

debug('request payload: ', JSON.stringify(payload));
try {
debug('request payload: ', JSON.stringify(payload));
} catch (e) {
debug('request payload is too big to log', e);
}

const method = (
payload.method || 'get'
Expand Down

0 comments on commit 3f52bdc

Please sign in to comment.