Requests ProxyError vs urllib3 ProxyError
Catch the exception exposed by the HTTP library used for the call and inspect nested causes without relying on a class name alone.
requests.exceptions.ProxyError and urllib3.exceptions.ProxyError are different exception classes. Sharing a short name does not make an except clause catch both.
For a Requests call, start with the public Requests exception API. Its transport adapter normally translates lower-level failures into the exceptions exposed by Requests. Older versions had specific wrapping bugs, so keep the library version with an unexpected traceback.
When investigating, inspect the exception's module, class, and chained cause. A nested MaxRetryError or connection failure can retain useful evidence about the earlier proxy stage.
Avoid importing an old vendored path from a historical workaround into a modern application. Catch the public exception appropriate to the current call, preserve the cause for diagnosis, and decide retry behavior separately. Catching every Exception and continuing forever only hides the original mismatch.