File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,14 @@ async def perform_request( # type: ignore[override]
158158 )
159159 elif isinstance (e , ssl .SSLError ):
160160 err = TlsError (str (e ), errors = (e ,))
161+ # Detect SSL errors for httpx v0.28.0+
162+ # Needed until https://github.com/encode/httpx/issues/3350 is fixed
163+ elif isinstance (e , httpx .ConnectError ) and e .__cause__ :
164+ context = e .__cause__ .__context__
165+ if isinstance (context , ssl .SSLError ):
166+ err = TlsError (str (context ), errors = (e ,))
167+ else :
168+ err = ConnectionError (str (e ), errors = (e ,))
161169 else :
162170 err = ConnectionError (str (e ), errors = (e ,))
163171 self ._log_request (
Original file line number Diff line number Diff line change 6565 "requests" ,
6666 "aiohttp" ,
6767 "httpx" ,
68- # https://github.com/encode/httpx/discussions/3214#discussioncomment-10830925
69- "httpcore<1.0.6" ,
7068 "respx" ,
7169 "opentelemetry-api" ,
7270 "opentelemetry-sdk" ,
You can’t perform that action at this time.
0 commit comments