You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connection.php L212
If the response body of a request with 404 status has JSON content, the library throws an exception instead of ClientError.
Cause: Connection::handleResponse() decodes the response body without checking the response status and then tries to create a ClientError object using the decoded response body object. ClientError is expecting a string as argument but gets an object instead and thus throws an Error
The text was updated successfully, but these errors were encountered:
Wow this is old. I got the same issue (but with a different error). Whenever the body is not JSON and you're using JSON, it will pass an incorrect argument to ClientError and crash. This does not happen if you're using Xml, as the body is returned raw.
This could be easily fixed by calling json_decode after the status check. I can make a pull request
Connection.php L212
If the response body of a request with 404 status has JSON content, the library throws an exception instead of ClientError.
Cause: Connection::handleResponse() decodes the response body without checking the response status and then tries to create a ClientError object using the decoded response body object. ClientError is expecting a string as argument but gets an object instead and thus throws an Error
The text was updated successfully, but these errors were encountered: