Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 4c0f873

Browse files
committed
Logging patch requests to see the body.
1 parent 5d4bfff commit 4c0f873

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/common/helper.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const request = require('superagent')
99
const m2mAuth = require('tc-core-library-js').auth.m2m
1010
const busApi = require('@topcoder-platform/topcoder-bus-api-wrapper')
1111
const constants = require('../constants')
12+
const logger = require('../common/logger')
1213
const m2m = m2mAuth(_.pick(config, ['AUTH0_URL', 'AUTH0_AUDIENCE', 'TOKEN_CACHE_TIME', 'AUTH0_PROXY_SERVER_URL']))
1314

1415
const Pool = ifxnjs.Pool
@@ -64,6 +65,7 @@ async function getM2MToken () {
6465
* @returns {Object} the response
6566
*/
6667
async function patchRequest (url, body, m2mToken) {
68+
logger.debug(`Patch Request Body: ${JSON.stringify(body)}`)
6769
return request
6870
.patch(url)
6971
.send(body)

0 commit comments

Comments
 (0)