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 on error inside function-based custom commands. #4309

Merged

Conversation

garg3133
Copy link
Member

Right now, if a custom command is written in function-style and some error occurs during the execution of that custom command, it leads to an unhandledRejection, leading to the closure of Nightwatch process without ending the webdriver session.

This PR fixes that behaviour by handling the error thrown inside the custom command correctly.

Copy link

Status

  • ❌ No modified files found in the types directory.
    Please make sure to include types for any changes you have made. Thank you!.

@garg3133 garg3133 merged commit 1d6e122 into nightwatchjs:main Nov 25, 2024
17 checks passed
@garg3133 garg3133 deleted the unhandledRejection-custom-command branch November 25, 2024 20:08
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.

1 participant