-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
/**
* @author Xenofon Spafaridis <nohponex@gmail.com>
* @since 0.0.0
*/
class ResponseException extends \Exception
{
/**
* @var Response
*/
private $response;
/**
* @var Errors
*/
private $errors;
/**
* @param Errors $errors
*/
public function __construct(Response $response)
{
$this->errors = (new Errors($response->getResponse()));
$this->response = $response;
parent::__construct('Response exception');
}
/**
* @return Error[]
*/
public function getErrors()
{
return $this->errors->getErrors();
}
/**
* @return Response
*/
public function getResponse(): Response
{
return $this->response;
}
}