Skip to content
Open
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
8 changes: 5 additions & 3 deletions src/Services/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use BoldApps\ShopifyToolkit\Exceptions\BadRequestException;
use BoldApps\ShopifyToolkit\Exceptions\NotAcceptableException;
use BoldApps\ShopifyToolkit\Exceptions\NotFoundException;
use BoldApps\ShopifyToolkit\Exceptions\ShopifyException;
use BoldApps\ShopifyToolkit\Exceptions\TooManyRequestsException;
use BoldApps\ShopifyToolkit\Exceptions\UnauthorizedException;
use BoldApps\ShopifyToolkit\Exceptions\UnprocessableEntityException;
Expand Down Expand Up @@ -167,8 +168,8 @@ public function delete($path, $params = [])
}

/**
* @param Request $request
* @param array $cookies
* @param Request $request
* @param array $cookies
* @param string | null $password
*
* $cookies is an array of SetCookie objects. see the Cart service for examples.
Expand All @@ -182,6 +183,7 @@ public function delete($path, $params = [])
* @throws UnprocessableEntityException
* @throws TooManyRequestsException
* @throws BadRequestException
* @throws ShopifyException
*/
private function sendRequestToShopify(Request $request, array $cookies = [], $password = null)
{
Expand Down Expand Up @@ -245,7 +247,7 @@ private function sendRequestToShopify(Request $request, array $cookies = [], $pa
case 429:
throw (new TooManyRequestsException($e->getMessage()))->setResponse($response);
default:
throw $e;
throw (new ShopifyException($e->getMessage()))->setResponse($response);
}
} catch (\Exception $e) {
$response = null;
Expand Down