-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix unhandledrejection
event shape
#151
Conversation
🦋 Changeset detectedLatest commit: d32379d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
5e9ab24
to
5b9ea6d
Compare
61baafd
to
14ad95f
Compare
a3eed79
to
f2c1457
Compare
f2c1457
to
d32379d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shipit
Currently users can add an event listener using
addEventListener
for theunhandledrejection
event. This handler is then invoked when an unhandled rejection occurs with an object that contains apromise
and areason
. In Node.js the handler has a different signature and takes those two values into separated arguments. Currently we are invoking the handler using the Node.js signature while we should useUnhandledPromiseRejection
instead. This PR fixes such issue and add some tests to ensure we are invoking the handler when there is an unhandled rejection.