0

Final Class Yiisoft\Yii\AuthClient\Exception\InvalidResponseException

InheritanceYiisoft\Yii\AuthClient\Exception\InvalidResponseException » RuntimeException

InvalidResponseException represents an exception caused by invalid remote server response.

Method Details

Hide inherited methods

__construct() public method

Constructor.

public mixed __construct ( \Psr\Http\Message\ResponseInterface $response, string $message, integer $code 0, Throwable $previous null )
$response \Psr\Http\Message\ResponseInterface

HTTP response instance

$message string

Error message

$code integer

Error code

$previous Throwable

The previous exception used for the exception chaining.

                public function __construct(
    private readonly ResponseInterface $response,
    string $message,
    $code = 0,
    ?Throwable $previous = null,
) {
    parent::__construct($message, $code, $previous);
}

            
getResponse() public method

public \Psr\Http\Message\ResponseInterface getResponse ( )
return \Psr\Http\Message\ResponseInterface

HTTP response instance that caused this exception.

                public function getResponse(): ResponseInterface
{
    return $this->response;
}