Skip to content

Commit 2e6ad6b

Browse files
committed
more logging
1 parent 70d8c14 commit 2e6ad6b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/common/helper.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,14 @@ function * getM2Mtoken () {
307307
function * getSubmissionPhaseId (challengeId) {
308308
let phaseId = null
309309
let response
310+
310311
try {
312+
logger.info(`Calling to challenge API to find submission phase Id for ${challengeId}`)
311313
const token = yield getM2Mtoken()
312314
response = yield request.get(`${config.CHALLENGEAPI_URL}/${challengeId}/phases`)
313315
.set('Authorization', `Bearer ${token}`)
314316
.set('Content-Type', 'application/json')
317+
logger.info(`returned from finding submission phase Id for ${challengeId}`)
315318
} catch (ex) {
316319
logger.error(`Error while accessing ${config.CHALLENGEAPI_URL}/${challengeId}/phases`)
317320
logger.debug('Setting submissionPhaseId to Null')
@@ -349,9 +352,11 @@ function * checkCreateAccess (authUser, subEntity) {
349352

350353
try {
351354
const token = yield getM2Mtoken()
355+
logger.info(`Calling to challenge API for fetch phases and winners for ${subEntity.challengeId}`)
352356
response = yield request.get(`${config.CHALLENGEAPI_URL}?filter=id=${subEntity.challengeId}`)
353357
.set('Authorization', `Bearer ${token}`)
354358
.set('Content-Type', 'application/json')
359+
logger.info(`returned for ${subEntity.challengeId} with ${JSON.stringify(response)}`)
355360
} catch (ex) {
356361
logger.error(`Error while accessing ${config.CHALLENGEAPI_URL}?filter=id=${subEntity.challengeId}`)
357362
logger.error(ex)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy