Introduce httpx.SSLError
exception
#3350
Labels
user-experience
Ensuring that users have a good experience using the library
httpx.SSLError
exception
#3350
httpcore 1.0.6 was released with a change that now maps
SSLError
tohttpcore.ConnectError
. But I'm realizing now that this change only affects asyncio (with and without anyio). All other backends (sync, trio with and without anyio) already raisedhttpx.ConnectError
. The current behavior is consistent across backends, as is shown by the following tests:However, it's not consistent with other HTTP libraries out there:
aiohttp.client_exceptions.ClientSSLError
requests.exceptions.SSLError
urllib3.exceptions.SSLError
As mentioned by Tom in the discussion, httpx should also be raising
httpx.SSLError
(a new subclass ofhttpx.RequestError
), which would make it easier for downstream users to switch to httpx.The text was updated successfully, but these errors were encountered: