Skip to content
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

Merged
merged 1 commit into from
Sep 27, 2022
Merged

Conversation

javivelasco
Copy link
Member

Currently users can add an event listener using addEventListener for the unhandledrejection event. This handler is then invoked when an unhandled rejection occurs with an object that contains a promise and a reason. 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 use UnhandledPromiseRejection instead. This PR fixes such issue and add some tests to ensure we are invoking the handler when there is an unhandled rejection.

@javivelasco javivelasco self-assigned this Sep 27, 2022
@changeset-bot
Copy link

changeset-bot bot commented Sep 27, 2022

🦋 Changeset detected

Latest commit: d32379d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
edge-runtime Patch

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

@vercel
Copy link

vercel bot commented Sep 27, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
edge-runtime ✅ Ready (Inspect) Visit Preview Sep 27, 2022 at 6:42PM (UTC)

Copy link
Collaborator

@Schniz Schniz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shipit

@javivelasco javivelasco merged commit 803cc4f into main Sep 27, 2022
@javivelasco javivelasco deleted the fix/unhandled-rejections-event branch September 27, 2022 19:07
@Kikobeats Kikobeats mentioned this pull request Oct 24, 2022
jridgewell pushed a commit to jridgewell/edge-runtime that referenced this pull request Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants