Serializable
public class TokenResponseException
extends com.google.api.client.http.HttpResponseException
To get the structured details, use getDetails()
.
Sample usage can be found for AuthorizationCodeTokenRequest
.
Modifier and Type | Method | Description |
---|---|---|
static TokenResponseException |
from(com.google.api.client.json.JsonFactory jsonFactory,
com.google.api.client.http.HttpResponse response) |
Returns a new instance of
TokenResponseException . |
TokenErrorResponse |
getDetails() |
Returns the token error response details or
null if unable to parse. |
computeMessageBuffer, getContent, getHeaders, getStatusCode, getStatusMessage, isSuccessStatusCode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public final TokenErrorResponse getDetails()
null
if unable to parse.public static TokenResponseException from(com.google.api.client.json.JsonFactory jsonFactory, com.google.api.client.http.HttpResponse response)
TokenResponseException
.
If there is a JSON error response, it is parsed using TokenErrorResponse
, which can be
inspected using getDetails()
. Otherwise, the full response content is read and
included in the exception message.
jsonFactory
- JSON factoryresponse
- HTTP responseTokenErrorResponse
Copyright © 2011–2019 Google. All rights reserved.