Skip to content

Added delete status of 204 #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/ShopifyResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
}
Expand Down