Skip to content

Commit 0112a9a

Browse files
fix: inverted retry condition
1 parent 7742369 commit 0112a9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Core/BaseClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ protected function sendRequest(
264264
}
265265

266266
if ($code >= 400 || is_null($rsp)) {
267-
if ($this->shouldRetry($opts, retryCount: $retryCount, rsp: $rsp)) {
267+
if (!$this->shouldRetry($opts, retryCount: $retryCount, rsp: $rsp)) {
268268
$exn = is_null($rsp) ? new APIConnectionException($req, previous: $err) : APIStatusException::from(request: $req, response: $rsp);
269269

270270
throw $exn;

0 commit comments

Comments
 (0)