Skip to content

Commit a8ab4fd

Browse files
authored
Merge pull request #153 from sunil-cote/master
Added delete status of 204
2 parents add5ce8 + 2f3be1d commit a8ab4fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/ShopifyResource.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,11 +524,12 @@ public function processResponse($responseArray, $dataKey = null)
524524
//Something went wrong, Checking HTTP Codes
525525
$httpOK = 200; //Request Successful, OK.
526526
$httpCreated = 201; //Create Successful.
527+
$httpDeleted = 204; //Delete Successful
527528

528529
//should be null if any other library used for http calls
529530
$httpCode = CurlRequest::$lastHttpCode;
530531

531-
if ($httpCode != null && $httpCode != $httpOK && $httpCode != $httpCreated) {
532+
if ($httpCode != null && $httpCode != $httpOK && $httpCode != $httpCreated && $httpCode != $httpDeleted) {
532533
throw new Exception\CurlException("Request failed with HTTP Code $httpCode.");
533534
}
534535
}

0 commit comments

Comments
 (0)