Class TokenResponseException

    • Method Detail

      • getDetails

        public final TokenErrorResponse getDetails()
        Returns the token error response details or null if unable to parse.
      • from

        public static TokenResponseException from​(com.google.api.client.json.JsonFactory jsonFactory,
                                                  com.google.api.client.http.HttpResponse response)
        Returns a new instance of 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.

        Parameters:
        jsonFactory - JSON factory
        response - HTTP response
        Returns:
        new instance of TokenErrorResponse