From 3545557ced7412a396b3d26aee4963ac0982d844 Mon Sep 17 00:00:00 2001 From: Thijsvandepoll Date: Tue, 6 Aug 2024 22:06:51 +0200 Subject: [PATCH] Removed raise for status, because it will prevent catching 404s for HEAD requests --- elastic_transport/_node/_http_httpx.py | 1 - 1 file changed, 1 deletion(-) diff --git a/elastic_transport/_node/_http_httpx.py b/elastic_transport/_node/_http_httpx.py index 8ca4263..ecbb0b0 100644 --- a/elastic_transport/_node/_http_httpx.py +++ b/elastic_transport/_node/_http_httpx.py @@ -146,7 +146,6 @@ async def perform_request( # type: ignore[override] headers=dict(resolved_headers), timeout=request_timeout, ) - resp.raise_for_status() response_body = resp.read() duration = time.perf_counter() - start except RERAISE_EXCEPTIONS + BUILTIN_EXCEPTIONS: