Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

feat: exit command line tool on unhandled Promise rejections #1840

Closed
wants to merge 1 commit into from

Conversation

vmx
Copy link
Member

@vmx vmx commented Jan 23, 2019

Currently the code base is slowly switching from callback style to
async/await. This means that there are more cases where there are
unhandled Promise rejections, sometime they even can't easilt be
prevented.

The command line interface now exits just like there was a normal
exception.

Currently the code base is slowly switching from callback style to
async/await. This means that there are more cases where there are
unhandled Promise rejections, sometime they even can't easilt be
prevented.

The command line interface now exits just like there was a normal
exception.
@ghost ghost assigned vmx Jan 23, 2019
@ghost ghost added the status/in-progress In progress label Jan 23, 2019
@alanshaw
Copy link
Member

Have you seen this happening?

@vmx
Copy link
Member Author

vmx commented Jan 23, 2019

I did, but this change 6066c97#diff-d231953efc1e3b19e5f18bf32ebe8f92 fixed it.

My problem was that the ipfs.object.get() call used a callback, but internally I made a Promise-based call. The subsequent throw err then lead to an unhandled Promise rejection.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants