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 and 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, isSuccessStatusCodeaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic 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 responseTokenErrorResponseCopyright © 2011-2013 Google. All Rights Reserved.