diff --git a/src/Client.php b/src/Client.php index 27baf33..9eb84fb 100644 --- a/src/Client.php +++ b/src/Client.php @@ -66,7 +66,7 @@ public function sendRequest(RequestInterface $request) private function createRequest(RequestInterface $request) { $options = [ - 'exceptions' => false, + 'exceptions' => false, 'allow_redirects' => false, ]; @@ -119,6 +119,7 @@ private function handleException(GuzzleExceptions\TransferException $exception, // Make sure we have a response for the HttpException if ($exception->hasResponse()) { $psr7Response = $this->createResponse($exception->getResponse()); + return new HttplugException\HttpException( $exception->getMessage(), $request,