We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d00a1d3 + 55e81fe commit 99d89e7Copy full SHA for 99d89e7
src/Adapter/Guzzle.php
@@ -121,11 +121,11 @@ private function checkError(ResponseInterface $response)
121
throw new JSONException();
122
}
123
124
- if (isset($json->errors)) {
+ if (isset($json->errors) && count($json->errors) >= 1) {
125
throw new ResponseException($json->errors[0]->message, $json->errors[0]->code);
126
127
128
- if (isset($json->success) && ($json->success === false)) {
+ if (isset($json->success) && !$json->success) {
129
throw new ResponseException('Request was unsuccessful.');
130
131
0 commit comments