diff --git a/src/Communibase/Connector.php b/src/Communibase/Connector.php index 72964c4..4bf600a 100644 --- a/src/Communibase/Connector.php +++ b/src/Communibase/Connector.php @@ -5,6 +5,7 @@ use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ClientException; +use GuzzleHttp\Exception\ConnectException; use Psr\Http\Message\StreamInterface; /** @@ -775,6 +776,10 @@ private function call($method, array $arguments) (($_ =& $response['errors']) ?: []) ); + } catch (ConnectException $e) { + + throw new Exception('Can not connect', 500, $e, []); + } } }