Skip to content

Commit 10f7229

Browse files
fix: don't throw while retrying
1 parent 89bace5 commit 10f7229

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ApiCall.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,12 @@ private function makeRequest(string $method, string $endPoint, bool $asJson, arr
273273
continue;
274274
}
275275
$this->setNodeHealthCheck($node, false);
276-
throw $this->getException($exception->getResponse()
276+
$lastException = $this->getException($exception->getResponse()
277277
->getStatusCode())
278278
->setMessage($exception->getMessage());
279279
} catch (TypesenseClientError | HttpClientException $exception) {
280280
$this->setNodeHealthCheck($node, false);
281-
throw $exception;
281+
$lastException = $exception;
282282
} catch (Exception $exception) {
283283
$this->setNodeHealthCheck($node, false);
284284
$lastException = $exception;

0 commit comments

Comments
 (0)