Skip to content
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

Non-json server error throws php error #37

Open
Aryess opened this issue Feb 11, 2020 · 1 comment
Open

Non-json server error throws php error #37

Aryess opened this issue Feb 11, 2020 · 1 comment

Comments

@Aryess
Copy link

Aryess commented Feb 11, 2020

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,

@specialtactics
Copy link
Contributor

Yeh, we get this from time to time and it's pretty annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@specialtactics @Aryess and others