-
Notifications
You must be signed in to change notification settings - Fork 183
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
Library assumes all responses are JSON structured - they aren't #302
Comments
|
This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days. |
I still have problems |
Same here. |
This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days. |
We are closing this issue because it has been inactive for a few months. If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines Thank you! |
The problem persists. You might want to reopen. |
Issue summary
Rest/Base.php's request() method assumes all responses to be JSONs whereas some of them are HTML.
Eg. for error codes 502/503/504, and possibly others, response is HTML, eg. <title>502 Bad Gateway</title>...
$response->getDecodedBody() will call json_decode() which will throw a JsonException which will prevent RestResourceRequestException from being thrown.
The text was updated successfully, but these errors were encountered: