-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[cdp][java] Continue requests without modification for know errors in NetworkInterceptor #13836
[cdp][java] Continue requests without modification for know errors in NetworkInterceptor #13836
Conversation
PR Description updated to latest commit (ed30887)
|
PR Review
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
@@ -200,6 +200,12 @@ public void prepareToInterceptTraffic() { | |||
pausedRequest -> { | |||
try { | |||
String id = getRequestId(pausedRequest); | |||
|
|||
if (hasErrorResponse(pausedRequest)) { | |||
devTools.send(continueWithoutModification(pausedRequest)); |
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.
Do we need to clean up the future in pendingResponses for this interception?
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.
Yes, you are right. I have updated the PR for the same.
… NetworkInterceptor This is an alternative solution to SeleniumHQ#13836. Related to SeleniumHQ#13774
… NetworkInterceptor This is an alternative solution to SeleniumHQ#13836. Related to SeleniumHQ#13774
… NetworkInterceptor This is an alternative solution to SeleniumHQ#13836. Related to SeleniumHQ#13774
cbed6a7
to
8b8418b
Compare
… NetworkInterceptor Related to SeleniumHQ#13774
8b8418b
to
788763d
Compare
User description
Related to #13774
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
Selenium was returning an HTTP 200 response if CDP responded with an error parameter in the paused request. The changes fix this by adding a check and continuing the request without modification.
Motivation and Context
Fixes #13774
Types of changes
Checklist
Type
Bug fix, Enhancement
Description
Changes walkthrough
Network.java
Enhance error handling in paused network requests
java/src/org/openqa/selenium/devtools/idealized/Network.java
without modification if an error is present.
when an error response is detected.
v121Network.java
Implement error response handling in v121
java/src/org/openqa/selenium/devtools/v121/v121Network.java
messages.
v122Network.java
Add error handling in network requests for v122
java/src/org/openqa/selenium/devtools/v122/v122Network.java
is present.
v123Network.java
Introduce error response handling in v123
java/src/org/openqa/selenium/devtools/v123/v123Network.java
V85Network.java
Simplify and enhance error handling in V85 network interception
java/src/org/openqa/selenium/devtools/v85/V85Network.java
NetworkInterceptorTest.java
Update tests for new error handling in network requests
java/test/org/openqa/selenium/devtools/NetworkInterceptorTest.java
during a network request.