Skip to content

HTTP error responses from Shopify are handled as success #352

@tkowalke

Description

@tkowalke

\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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions