Class ApiException

All Implemented Interfaces:
Serializable

public class ApiException extends RuntimeException
Parent type for exceptions thrown by the client when receiving failed responses to its requests.
See Also:
  • Constructor Details

    • ApiException

      public ApiException()
    • ApiException

      public ApiException(@Nonnull String message)
    • ApiException

      public ApiException(@Nonnull String message, @Nonnull Throwable cause)
    • ApiException

      public ApiException(@Nonnull Throwable cause)
  • Method Details

    • getResponseStatusCode

      public int getResponseStatusCode()
      Gets the HTTP response status code
      Returns:
      The response status code from the failed response.
    • setResponseStatusCode

      protected void setResponseStatusCode(int responseStatusCode)
      Sets the HTTP response status code
      Parameters:
      responseStatusCode - The response status code to set.
    • getResponseHeaders

      @Nonnull public ResponseHeaders getResponseHeaders()
      Gets the HTTP response headers for the error response
      Returns:
      The response headers collections from the failed response.
    • setResponseHeaders

      protected void setResponseHeaders(@Nonnull ResponseHeaders responseHeaders)
      Sets the HTTP response headers for the error response
      Parameters:
      responseHeaders - The response headers collections to set.