*/ class GuzzleException extends ConnectionException { /** * @var TransferException */ protected $_guzzleException; public function __construct(TransferException $guzzleException, ?Request $request = null, ?Response $response = null) { $this->_guzzleException = $guzzleException; $message = $this->getErrorMessage($this->getGuzzleException()); parent::__construct($message, $request, $response); } public function getErrorMessage(TransferException $guzzleException): string { return $guzzleException->getMessage(); } /** * @return TransferException */ public function getGuzzleException(): BaseGuzzleException { return $this->_guzzleException; } }