From 2f3be1d3b895b004f8de0e97f32ef734467f7f94 Mon Sep 17 00:00:00 2001 From: sunil-cote <62141449+sunil-cote@users.noreply.github.com> Date: Tue, 14 Apr 2020 16:55:02 +0100 Subject: [PATCH] Added delete status of 204 --- lib/ShopifyResource.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ShopifyResource.php b/lib/ShopifyResource.php index f9940be..66ce2b7 100644 --- a/lib/ShopifyResource.php +++ b/lib/ShopifyResource.php @@ -524,11 +524,12 @@ public function processResponse($responseArray, $dataKey = null) //Something went wrong, Checking HTTP Codes $httpOK = 200; //Request Successful, OK. $httpCreated = 201; //Create Successful. + $httpDeleted = 204; //Delete Successful //should be null if any other library used for http calls $httpCode = CurlRequest::$lastHttpCode; - if ($httpCode != null && $httpCode != $httpOK && $httpCode != $httpCreated) { + if ($httpCode != null && $httpCode != $httpOK && $httpCode != $httpCreated && $httpCode != $httpDeleted) { throw new Exception\CurlException("Request failed with HTTP Code $httpCode."); } }