Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 47381d7

Browse files
committed
Also catch guzzle3 ServerErrorResponseException
1 parent 0d7cfda commit 47381d7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Check/GuzzleHttpService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Guzzle\Http\Client as Guzzle3Client;
1212
use Guzzle\Http\ClientInterface as Guzzle3ClientInterface;
1313
use Guzzle\Http\Exception\ClientErrorResponseException;
14+
use Guzzle\Http\Exception\ServerErrorResponseException;
1415
use GuzzleHttp\Client as Guzzle456Client;
1516
use GuzzleHttp\ClientInterface as Guzzle456ClientInterface;
1617
use ZendDiagnostics\Result\Failure;
@@ -98,6 +99,8 @@ private function guzzle3Check()
9899
->send();
99100
} catch (ClientErrorResponseException $e) {
100101
$response = $e->getResponse();
102+
} catch (ServerErrorResponseException $e) {
103+
$response = $e->getResponse();
101104
}
102105

103106
if ($this->statusCode !== ($statusCode = $response->getStatusCode())) {

0 commit comments

Comments
 (0)