-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[rb] error handling improvements #16480
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
base: trunk
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
PR Code Suggestions ✨Explore these optional code suggestions:
|
1996cdc
to
f5a3264
Compare
f5a3264
to
10be9c7
Compare
User description
Tweak logic on the auth handler to improve errors.
Should we error if both block and username/password are sent? The block is currently ignored which seemed confusing to me, but the username, password are ignored if it just grabs the block, so maybe it needs another tweak.
The rescue in
#send_cmd
is mostly to rescue timeout errors and make them WebDriverError; maybe we should only be checking for those instead of all StandardError? What do you think?PR Type
Enhancement, Bug fix
Description
Improve error handling in BiDi command sending with StandardError rescue
Enforce explicit authentication handler configuration validation
Raise ArgumentError when neither block nor credentials provided
Wrap caught errors as WebDriverError with descriptive messages
Diagram Walkthrough
File Walkthrough
bidi.rb
Add error handling rescue in send_cmd method
rb/lib/selenium/webdriver/bidi.rb
send_cmd
methoderror
network.rb
Validate authentication handler parameters explicitly
rb/lib/selenium/webdriver/common/network.rb
add_authentication_handler
logic to validate inputsexplicitly
provided
block_given?
first