From 31f3efa17fa2b6accaebe6e16e1bc68dd2543863 Mon Sep 17 00:00:00 2001 From: Kevin Porras Date: Mon, 2 Oct 2023 13:38:56 -0600 Subject: [PATCH] Use 409 instead of 410. --- src/Request/Request.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Request/Request.php b/src/Request/Request.php index 86b5c570b..4c6826d09 100755 --- a/src/Request/Request.php +++ b/src/Request/Request.php @@ -227,8 +227,8 @@ private function createRetryDecider(): callable ['error' => $exception->getMessage()] ); } else { - if (preg_match('/[2,4]0\d/', $response->getStatusCode()) || $response->getStatusCode() == 410) { - // Do not retry on 20x, 40x or 410 responses. + if (preg_match('/[2,4]0\d/', $response->getStatusCode())) { + // Do not retry on 20x or 40x responses. return false; } @@ -428,7 +428,7 @@ public function request($path, array $options = []): RequestOperationResult $this->logger->debug($jsonException->getMessage()); } - if ($response->getStatusCode() == 410 && $body == "icr_site") { + if ($response->getStatusCode() == 409 && $body == "icr_site") { // This request is expected to fail for an ICR site, throw exception that will be catched down the road. throw new TerminusIcrSiteException("This is an ICR site."); }