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]
158
158
)
159
159
elif isinstance (e , ssl .SSLError ):
160
160
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 ,))
161
169
else :
162
170
err = ConnectionError (str (e ), errors = (e ,))
163
171
self ._log_request (
Original file line number Diff line number Diff line change 65
65
"requests" ,
66
66
"aiohttp" ,
67
67
"httpx" ,
68
- # https://github.com/encode/httpx/discussions/3214#discussioncomment-10830925
69
- "httpcore<1.0.6" ,
70
68
"respx" ,
71
69
"opentelemetry-api" ,
72
70
"opentelemetry-sdk" ,
You can’t perform that action at this time.
0 commit comments