We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d00a1d3 commit 55e81feCopy full SHA for 55e81fe
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