Skip to content

Commit 31f3efa

Browse files
committed
Use 409 instead of 410.
1 parent b666f4e commit 31f3efa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Request/Request.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ private function createRetryDecider(): callable
227227
['error' => $exception->getMessage()]
228228
);
229229
} else {
230-
if (preg_match('/[2,4]0\d/', $response->getStatusCode()) || $response->getStatusCode() == 410) {
231-
// Do not retry on 20x, 40x or 410 responses.
230+
if (preg_match('/[2,4]0\d/', $response->getStatusCode())) {
231+
// Do not retry on 20x or 40x responses.
232232
return false;
233233
}
234234

@@ -428,7 +428,7 @@ public function request($path, array $options = []): RequestOperationResult
428428
$this->logger->debug($jsonException->getMessage());
429429
}
430430

431-
if ($response->getStatusCode() == 410 && $body == "icr_site") {
431+
if ($response->getStatusCode() == 409 && $body == "icr_site") {
432432
// This request is expected to fail for an ICR site, throw exception that will be catched down the road.
433433
throw new TerminusIcrSiteException("This is an ICR site.");
434434
}

0 commit comments

Comments
 (0)