File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ async function getMemberIdByHandle (handle) {
169169 return profile . userId
170170 } catch ( e ) {
171171 // fall back to v3 api...
172+ logger . warn ( `Get MemberID by Handle from Dynamo Failed, trying v3 Members API. Error: ${ JSON . stringify ( e ) } ` )
172173 return getMemberIdByHandleFromV3Members ( handle )
173174 }
174175}
Original file line number Diff line number Diff line change @@ -344,10 +344,11 @@ deleteResource.schema = {
344344 * @returns {Array } an array of challenge ids represents challenges that given member has access to.
345345 */
346346async function listChallengesByMember ( memberId , criteria ) {
347- const res = await helper . getRequest ( `${ config . USER_API_URL } ?filter=id=${ memberId } ` )
348- if ( _ . get ( res , 'body.result.content' ) . length === 0 ) {
349- throw new errors . BadRequestError ( `User with id: ${ memberId } doesn't exist` )
350- }
347+ // removing this call. If a member doesn't exist, it won't find any challenges
348+ // const res = await helper.getRequest(`${config.USER_API_URL}?filter=id=${memberId}`)
349+ // if (_.get(res, 'body.result.content').length === 0) {
350+ // throw new errors.BadRequestError(`User with id: ${memberId} doesn't exist`)
351+ // }
351352
352353 const boolQuery = [ ]
353354 const mustQuery = [ ]
You can’t perform that action at this time.
0 commit comments