-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cdp][java] Allow filters to recover from failed requests in NetworkI…
…nterceptor This change introduces a new exception, which is thrown through the user's filter chain when the browser fails to get a response for a request and a NetworkInterceptor is in use. This gives the filter an opportunity to catch the exception and return a custom HTTP response. Related to #13774
- Loading branch information
1 parent
ffb03bd
commit 12eba88
Showing
3 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
java/src/org/openqa/selenium/devtools/RequestFailedException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.openqa.selenium.devtools; | ||
|
||
import org.openqa.selenium.WebDriverException; | ||
import org.openqa.selenium.remote.http.Filter; | ||
import org.openqa.selenium.remote.http.HttpHandler; | ||
|
||
/** | ||
* This exception is thrown by the final {@link HttpHandler} in a {@link Filter} chain when the | ||
* browser fails to send a HTTP request. It can be caught in a {@link Filter} to handle the error | ||
* by, for example, returning a custom HTTP response. | ||
*/ | ||
public class RequestFailedException extends WebDriverException { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters