Class ApiException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ApiException
    extends java.lang.RuntimeException
    Thrown for a non-2xx HTTP response, a transport failure, or a serialization/deserialization error. Unchecked so generated method signatures stay free of throws clauses.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ApiException​(int statusCode, java.lang.String message, java.lang.String url, com.fasterxml.jackson.databind.JsonNode body, java.lang.String rawBody, java.lang.Throwable cause)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.fasterxml.jackson.databind.JsonNode getBody()
      Parsed JSON error body, or null if the body was absent or not JSON.
      java.lang.String getRawBody()
      Raw response body text, or null.
      int getStatusCode()
      HTTP status code, or 0 for a transport/serialization failure.
      java.lang.String getUrl()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ApiException

        public ApiException​(int statusCode,
                            java.lang.String message,
                            java.lang.String url,
                            com.fasterxml.jackson.databind.JsonNode body,
                            java.lang.String rawBody,
                            java.lang.Throwable cause)
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        HTTP status code, or 0 for a transport/serialization failure.
      • getUrl

        public java.lang.String getUrl()
      • getBody

        public com.fasterxml.jackson.databind.JsonNode getBody()
        Parsed JSON error body, or null if the body was absent or not JSON.
      • getRawBody

        public java.lang.String getRawBody()
        Raw response body text, or null.