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: Handle unhandled promise rejections in bin #255

Merged
merged 1 commit into from May 16, 2022

Conversation

quinnturner
Copy link
Member

@quinnturner quinnturner commented May 16, 2022

When using Node 12/14 + allowlisting using the old advisory format, the pipeline unexpectedly passes because Node 12/14 does not throw an error with unhandled promise rejections.

Now, instead, we handle promise rejections at the root and explicitly process.exit(1).

I found this out by looking at a community project:

https://github.com/brave-intl/publishers/runs/6428625498?check_suite_focus=true

This is the before-and-after of the change:
image

I am considering releasing this with a patch version bump.

When using Node 12/14 + allowlisting using the old advisory format,
the unexpectedly pipeline passes because Node 12/14 does not throw
an error with unhandled promise rejections.

Now, instead, we handle promise rejections at the root and
explicitly process.exit(1).
@quinnturner quinnturner merged commit 552f480 into IBM:main May 16, 2022
@quinnturner quinnturner deleted the unhandled-promise branch May 16, 2022 23:37
@quinnturner quinnturner mentioned this pull request May 19, 2022
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.

None yet

2 participants