Determine whether the given error is related to a proxy issue. Check if the error message contains known proxy-related error keywords.
(error: HTTPError)
| 255 | |
| 256 | @staticmethod |
| 257 | def _is_proxy_error(error: HTTPError) -> bool: |
| 258 | """Determine whether the given error is related to a proxy issue. |
| 259 | |
| 260 | Check if the error message contains known proxy-related error keywords. |
| 261 | """ |
| 262 | if isinstance(error, ImpitProxyError): |
| 263 | return True |
| 264 | |
| 265 | if any(needle in str(error) for needle in ROTATE_PROXY_ERRORS): # noqa: SIM103 |
| 266 | return True |
| 267 | |
| 268 | return False |
| 269 | |
| 270 | @override |
| 271 | async def cleanup(self) -> None: |
no outgoing calls
no test coverage detected