Serializablepublic 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, isSuccessStatusCodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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–2019 Google. All rights reserved.