# Class yii\authclient\InvalidResponseException

Inheritance | yii\authclient\InvalidResponseException » yii\base\Exception » Exception
Subclasses | yii\authclient\ClientErrorResponseException
Available since version | 2.0
Source Code | https://github.com/yiisoft/yii2-authclient/blob/master/InvalidResponseException.php

InvalidResponseException represents an exception caused by a non-successful server response status code.

See also yii\httpclient\Response::getIsOk().

## Public Properties

Hide inherited properties

Property | Type | Description | Defined By
--- | --- | --- | ---
$response | yii\httpclient\Response | HTTP response instance. | yii\authclient\InvalidResponseException

## Public Methods

Hide inherited methods

Method | Description | Defined By
--- | --- | ---
__construct() | Constructor. | yii\authclient\InvalidResponseException
getName() |  | yii\base\Exception

## Property Details

Hide inherited properties

$response public property (available since version 2.1)

HTTP response instance.

public yii\httpclient\Response $response = null

## Method Details

Hide inherited methods

__construct() public method

Constructor.

public void __construct ( $response, $message = null, $code = 0, Exception $previous = null )
$response | yii\httpclient\Response | Response body
$message | string | Error message
$code | integer | Error code
$previous | Exception | The previous exception used for the exception chaining.

Source code

                    public function __construct($response, $message = null, $code = 0, \Exception $previous = null)
    {
        $this->response = $response;
        parent::__construct($message, $code, $previous);
    }

getName() public method

Defined in: yii\base\Exception::getName()

public string getName ( )
return | string | The user-friendly name of this exception

Source code

                    public function getName()
    {
        return 'Exception';
    }