Version
1.43.0
Steps to reproduce
Example steps (replace with your own):
- Create a new_page using a proxy_config server url that will fail:
page = await browser.new_page(
proxy={}, # configure with a failing server
)
await page.goto(...)
Expected behavior
Raise an exception type that can be handled in an except block similar to TimeoutError
Actual behavior
Raises a generic exception of type:
playwright._impl._errors.Error
Error('net::ERR_PROXY_CONNECTION_FAILED at http://...')
Additional context
The Error type raised and the object format would require me to string match for "net::ERR_PROXY_CONNECTION_FAILED" in the message string.
Is there a more elegant way to do this? Maybe I am missing something but could not find anything on Google or Github about this.
Environment
Version
1.43.0
Steps to reproduce
Example steps (replace with your own):
Expected behavior
Raise an exception type that can be handled in an except block similar to TimeoutError
Actual behavior
Raises a generic exception of type:
playwright._impl._errors.Error
Error('net::ERR_PROXY_CONNECTION_FAILED at http://...')Additional context
The Error type raised and the object format would require me to string match for "net::ERR_PROXY_CONNECTION_FAILED" in the message string.
Is there a more elegant way to do this? Maybe I am missing something but could not find anything on Google or Github about this.
Environment