Class TokenResponseException (1.68.0)

public class TokenResponseException : Exception, ISerializable

Token response exception which is thrown in case of receiving a token error when an authorization code or an access token is expected.

Inheritance

object > Exception > TokenResponseException

Implements

ISerializable

Namespace

Google.Apis.Auth.OAuth2.Responses

Assembly

Google.Apis.Auth.dll

Constructors

TokenResponseException(TokenErrorResponse)

public TokenResponseException(TokenErrorResponse error)

Constructs a new token response exception from the given error.

Parameter
Name Description
error TokenErrorResponse

TokenResponseException(TokenErrorResponse, HttpStatusCode?)

public TokenResponseException(TokenErrorResponse error, HttpStatusCode? statusCode)

Constructs a new token response exception from the given error nad optional HTTP status code.

Parameters
Name Description
error TokenErrorResponse
statusCode HttpStatusCode

Properties

Error

public TokenErrorResponse Error { get; }

The error information.

Property Value
Type Description
TokenErrorResponse

StatusCode

public HttpStatusCode? StatusCode { get; }

HTTP status code of error, or null if unknown.

Property Value
Type Description
HttpStatusCode

Extension Method