Failing to pay ticket

Register
Submit a solution
The challenge is finished.

Challenge Overview

@afrisalyp - Another one that's failing is a ticket in a private repo.

The DB has this repo ID, challenge ID, number, and provider, but it seems to be failing to find the ticket:

debug: Enter ensureChallengeExists to scan an issue record
debug: Enter ensureChallengeExists. Number: 39
debug: Enter ensureChallengeExists. provider: github
debug: Enter ensureChallengeExists. repositoryId: 221569487
debug: Enter scanOne.
debug: scanOne. Error. TypeError: Cannot read property 'map' of undefined
debug: scanOne. Result.
debug:
error: Error happened in system
TypeError: Cannot read property 'count' of undefined
    at model.scan.exec (/topcoder-x-processor/utils/db-helper.js:67:29)
    at /topcoder-x-processor/node_modules/q/q.js:2059:17
    at runSingle (/topcoder-x-processor/node_modules/q/q.js:137:13)
    at flush (/topcoder-x-processor/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickDomainCallback (internal/process/next_tick.js:219:9)
error: Error happened in process
TypeError: Cannot read property 'id' of undefined
    at handleIssueClose (/topcoder-x-processor/services/IssueService.js:482:51)
    at <anonymous>
    at runMicrotasksCallback (internal/process/next_tick.js:122:5)
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at Immediate._tickDomainCallback (internal/process/next_tick.js:219:9)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)
error:  message=Cannot read property 'id' of undefined, stack=TypeError: Cannot read property 'id' of undefined
    at handleIssueClose (/topcoder-x-processor/services/IssueService.js:482:51)
    at <anonymous>
    at runMicrotasksCallback (internal/process/next_tick.js:122:5)
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at Immediate._tickDomainCallback (internal/process/next_tick.js:219:9)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5), logged=true
debug:
error: Error happened in system


Final Submission Guidelines

Git issue link: https://github.com/topcoder-platform/topcoder-x-ui/issues/245

Review style

Final Review

Community Review Board

Approval

User Sign-Off

Challenge links

ID: 30108384