-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[py]: return message
as part of exception in execute
method
#15751
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine, but it should probably raise WebDriverException
instead of a generic Exception.
Same thing in the _deserialize_result
method in that file... if you want to fix that while you're in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @cgoldberg, let's change to WebDriverException
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
User description
🔗 Related Issues
💥 What does this PR do?
Returns a meaningful error and message when an exception is raised in the WebSocketConnection
execute
method.Earlier only
'error': 'unknown error'
exception was raised which doesn't provides any good error message.Now, its much better:
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Bug fix
Description
Improve exception handling in WebSocketConnection
execute
Include error message in raised exceptions for clarity
Enhance debugging by surfacing server-side error details
Changes walkthrough 📝
websocket_connection.py
Enhance exception message handling in WebSocketConnection
py/selenium/webdriver/remote/websocket_connection.py