good-first-issue icon indicating copy to clipboard operation
good-first-issue copied to clipboard

Unhandled promise rejection

Open bnb opened this issue 6 years ago • 3 comments

I've gotten this a couple times recently. If anyone wants to tackle, feel free ❤️

$ good-first-issue

? Choose a project: debugger.html
(node:89426) UnhandledPromiseRejectionWarning: HttpError: Validation Failed
    at /Users/cyren/GitHub/good-first-issue/node_modules/@octokit/request/dist-node/index.js:66:23
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
    at async search (/Users/cyren/GitHub/good-first-issue/lib/search.js:18:20)
    at async Command.<anonymous> (/Users/cyren/GitHub/good-first-issue/bin/good-first-issue.js:45:20)
(node:89426) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a
 catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:89426) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

bnb avatar Jul 22 '19 23:07 bnb

Needs some try / catch block. I'll check that.

DanielRuf avatar Aug 10 '19 09:08 DanielRuf

Needs some try / catch block. I'll check that.

This is not the case anymore as you already wrap the whole in a try / catch an return the error object. I think this can be closed.

DanielRuf avatar Aug 10 '19 11:08 DanielRuf

See https://github.com/cutenode/good-first-issue/blob/e456412c24df153b90fb0c2c0b9a43c84fffbad3/bin/good-first-issue.js#L28 and https://github.com/cutenode/good-first-issue/blob/41f30ce9f296336194fed7d077b0ace5846458c9/bin/good-first-issue.js#L29

DanielRuf avatar Aug 10 '19 11:08 DanielRuf