Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions elastic_transport/_node/_http_httpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ async def perform_request( # type: ignore[override]
)
elif isinstance(e, ssl.SSLError):
err = TlsError(str(e), errors=(e,))
# Detect SSL errors for httpx v0.28.0+
# Needed until https://github.com/encode/httpx/issues/3350 is fixed
elif isinstance(e, httpx.ConnectError) and e.__cause__:
context = e.__cause__.__context__
if isinstance(context, ssl.SSLError):
err = TlsError(str(context), errors=(e,))
else:
err = ConnectionError(str(e), errors=(e,))
else:
err = ConnectionError(str(e), errors=(e,))
self._log_request(
Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@
"requests",
"aiohttp",
"httpx",
# https://github.com/encode/httpx/discussions/3214#discussioncomment-10830925
"httpcore<1.0.6",
"respx",
"opentelemetry-api",
"opentelemetry-sdk",
Expand Down