diff --git a/src/Exceptions/Exceptions/ApiInternalCallException.php b/src/Exceptions/Exceptions/ApiInternalCallException.php index 80c59aa..c0a8343 100644 --- a/src/Exceptions/Exceptions/ApiInternalCallException.php +++ b/src/Exceptions/Exceptions/ApiInternalCallException.php @@ -16,6 +16,11 @@ class ApiInternalCallException extends \RuntimeException */ protected $exceptionMessage; + /** + * @var \Exception + */ + protected $previousException; + /** * @param Response $response * @param string $message @@ -24,6 +29,8 @@ public function __construct(Response $response, $message = 'There was an error w { $this->response = $response; $this->exceptionMessage = $message; + $this->message = $message; + $this->previousException = $response->exception; } /** @@ -41,4 +48,13 @@ public function getExceptionMessage() { return $this->exceptionMessage; } + + /** + * @return \Exception + */ + public function getPreviousException() + { + return $this->previousException; + } } +