docs: public static TokenResponseException from(JsonFactory jsonFactory, HttpResponse response) {
      HttpResponseException.Builder builder = new HttpResponseException.Builder(
          response.getStatusCode(), response.getStatusMessage(), response.getHeaders());
      // details
      Preconditions.checkNotNull(jsonFactory);
      TokenErrorResponse details = null;
      String detailString = null;
      String contentType = response.getContentType();
      try {
        if (!response.isSuccessStatusCode() && contentType != null && response.getContent() != null
            && HttpMediaType.equalsIgnoreParameters(Json.MEDIA_TYPE, contentType)) {
          details = new JsonObjectParser(jsonFactory).parseAndClose(
              response.getContent(), response.getContentCharset(), TokenErrorResponse.class);
          detailString = details.toPrettyString();
        } else {
          detailString = response.parseAsString();
        }
      } catch (IOException exception) {
        // it would be bad to throw an exception while throwing an exception
        exception.printStackTrace();
      }
      // message
      StringBuilder message = HttpResponseException.computeMessageBuffer(response);
      if (!com.google.api.client.util.Strings.isNullOrEmpty(detailString)) {
        message.append(StringUtils.LINE_SEPARATOR).append(detailString);
        builder.setContent(detailString);
      }
      builder.setMessage(message.toString());
      return new TokenResponseException(builder, details);
    }