Skip to content

Non-json server error throws php error #37

@Aryess

Description

@Aryess

Hi,

Found an issue with the error reporting, on this line in particular:

$body = \GuzzleHttp\json_decode($e->getResponse()->getBody(), true);

We've got some errors returned in plain HTML, which (obviously) failed to be json_decoded

Screen Shot 2020-02-11 at 9 49 25 pm

This might be a server issue more than the SDK, however that would be good to be able to handle a non-json error as well, as for not it just throws a PHP error, and I had to manually edit the package on prod to be able to see what was happening

Cheers,

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