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(core): catch rejected promises in convertNxExecutor #12627

Merged

Conversation

philipjfulcher
Copy link
Collaborator

@philipjfulcher philipjfulcher commented Oct 14, 2022

Current Behavior

If an Nx executor when wrapped as an Angular builder, errors are not caught causing the builder to hang.

This is demonstrated in this repo: https://github.com/philipjfulcher/angular-builder-uncaught-rejection

After cloning and running npm i, try npx nx allof-run-commands-fails app to see the uncaught promise rejection error. The process will not close on its own.

Expected Behavior

If an Nx executor when wrapped as an Angular builder, errors are caught and report failure successfully.

@vercel
Copy link

vercel bot commented Oct 14, 2022

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

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Oct 14, 2022 at 8:36PM (UTC)

Comment on lines +88 to +90
.catch((err) => {
subscriber.error(err);
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This PR got hard to read because of formatting, this block is the important bit.

@AgentEnder AgentEnder merged commit 62e91f3 into nrwl:master Oct 14, 2022
@philipjfulcher philipjfulcher deleted the handle-uncaught-error-angular-builder branch November 27, 2022 22:35
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
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.

None yet

2 participants