Skip to content

Commit

Permalink
chore: Make sure the body debug log does not confuse people, by not J…
Browse files Browse the repository at this point in the history
…SON stringifying when the body is already a string. Was only used in logging, not in the actual payload
  • Loading branch information
nklomp committed Feb 7, 2024
1 parent 59fba74 commit 3684b1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/common/lib/functions/HttpUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const openIdFetch = async <T>(

debug(`START fetching url: ${url}`);
if (body) {
debug(`Body:\r\n${JSON.stringify(body)}`);
debug(`Body:\r\n${typeof body == 'string' ? body : JSON.stringify(body)}`);
}
debug(`Headers:\r\n${JSON.stringify(payload.headers)}`);
const origResponse = await fetch(url, payload);
Expand Down

0 comments on commit 3684b1e

Please sign in to comment.