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 typing in WebdriverJS to improve error handling in CLI #422

Closed
Zidious opened this issue Jan 10, 2022 · 0 comments · Fixed by #423
Closed

fix typing in WebdriverJS to improve error handling in CLI #422

Zidious opened this issue Jan 10, 2022 · 0 comments · Fixed by #423
Assignees
Labels
bug Something isn't working

Comments

@Zidious
Copy link
Contributor

Zidious commented Jan 10, 2022

For reference: #421

The type in webdriverjs, callback function used in analyze needs to be of type Error | null instead of string | null as when used in CLI, we are unable to properly handle the error as it is of type string and not Error therefore we do not have access to Error's functions i.e. e.message or e.stack. Example is when a user uses flag --include and provided an invalid / non-existent CSS selector when --show-errors is provided to get why it has failed we are presented with undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant