\PHPShopify\HttpRequestJson::processResponse only handles HTTP error response codes when the response body contains no valid JSON.
Shopify sends JSON encoded error information with at least some HTTP 4xx responses.
E.g. when querying all locations we got the following response body and it was passed through to our application without throwing an exception:
{"error":"[API] This action requires merchant approval for read_locations scope."}
Pull request with fix following shortly.
\PHPShopify\HttpRequestJson::processResponseonly handles HTTP error response codes when the response body contains no valid JSON.Shopify sends JSON encoded error information with at least some HTTP 4xx responses.
E.g. when querying all locations we got the following response body and it was passed through to our application without throwing an exception:
{"error":"[API] This action requires merchant approval for read_locations scope."}Pull request with fix following shortly.