Class APIException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.moesif.api.exceptions.APIException
All Implemented Interfaces:
Serializable

public class APIException extends Exception
See Also:
  • Constructor Details

    • APIException

      public APIException(String reason)
      Initialization constructor
      Parameters:
      reason - The reason for throwing exception
    • APIException

      public APIException(String reason, HttpContext context)
      Initialization constructor
      Parameters:
      reason - The reason for throwing exception
      context - The http context of the API exception
  • Method Details

    • getResponseCode

      public int getResponseCode()
      The HTTP response code from the API request
      Returns:
      the HTTP status code
    • getHttpContext

      public HttpContext getHttpContext()
      The HTTP response body from the API request
      Returns:
      the HTTP context containing HTTO response