From 10f7229a5f55462a473cce55f1eb91432c33acf0 Mon Sep 17 00:00:00 2001 From: Anthony Bachour Date: Wed, 18 Jun 2025 17:02:06 -0400 Subject: [PATCH] fix: don't throw while retrying --- src/ApiCall.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ApiCall.php b/src/ApiCall.php index 523369ce..501f6f75 100644 --- a/src/ApiCall.php +++ b/src/ApiCall.php @@ -273,12 +273,12 @@ private function makeRequest(string $method, string $endPoint, bool $asJson, arr continue; } $this->setNodeHealthCheck($node, false); - throw $this->getException($exception->getResponse() + $lastException = $this->getException($exception->getResponse() ->getStatusCode()) ->setMessage($exception->getMessage()); } catch (TypesenseClientError | HttpClientException $exception) { $this->setNodeHealthCheck($node, false); - throw $exception; + $lastException = $exception; } catch (Exception $exception) { $this->setNodeHealthCheck($node, false); $lastException = $exception;