From e987df2a12a809a15f590ac205906e2138f94f9e Mon Sep 17 00:00:00 2001 From: Charly Laurent Date: Thu, 6 Jun 2024 15:38:16 +0200 Subject: [PATCH] Handle `SSLError` (#918) --- CHANGELOG.md | 4 ++++ httpcore/_backends/anyio.py | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d1ff8fc..992dcff6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## Unreleased + +- Handle `SSLError` exception. (#918) + ## 1.0.5 (March 27th, 2024) - Handle `EndOfStream` exception for anyio backend. (#899) diff --git a/httpcore/_backends/anyio.py b/httpcore/_backends/anyio.py index 5731f5e7..9f4fdf86 100644 --- a/httpcore/_backends/anyio.py +++ b/httpcore/_backends/anyio.py @@ -64,6 +64,7 @@ async def start_tls( TimeoutError: ConnectTimeout, anyio.BrokenResourceError: ConnectError, anyio.EndOfStream: ConnectError, + ssl.SSLError: ConnectError, } with map_exceptions(exc_map): try: