Class RestCallException

All Implemented Interfaces:
Serializable

public final class RestCallException extends HttpException
Exception representing a 400+ HTTP response code against a remote resource or other exception.
See Also:
  • Constructor Details

  • Method Details

    • getThrown

      public Thrown getThrown()
      Returns the value of the "Thrown" header on the response.
      Returns:
      The value of the "Thrown" header on the response, never null.
    • getResponse

      Returns the HTTP response object that caused this exception.
      Returns:
      The HTTP response object that caused this exception, or null if no response was created yet when the exception was thrown.
    • getResponseCode

      public int getResponseCode()
      Returns the HTTP response status code.
      Returns:
      The response status code. If a connection could not be made at all, returns 0.
    • getCause

      public <T extends Throwable> T getCause(Class<T> c)
      Similar to Throwable.getCause() but searches until it finds the throwable of the specified type.
      Type Parameters:
      T - The throwable type.
      Parameters:
      c - The throwable type.
      Returns:
      The cause of the specified type, or null of not found.