Skip to content

Commit 8e7d0a3

Browse files
committed
Also report errors that occur in the Guzzle request.
1 parent f17a668 commit 8e7d0a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/QueryResult.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ public function getRawResponse()
7171
*/
7272
public function hasError()
7373
{
74+
if ($this->getRawResponse()->getStatusCode() != 200) {
75+
return TRUE;
76+
}
7477
// If an error occurs the Piwik server still returns a 200 OK response,
7578
// but the body of the response will contain the string "error" in the
7679
// "result" parameter.

0 commit comments

Comments
 (0)