Class APIException

  • Constructor Details

    • APIException

      public APIException(String message)
      APIException constructor.
      Parameters:
      message - the exception message
    • APIException

      public APIException(String message, Throwable ex)
      APIException constructor.
      Parameters:
      message - the exception message
      ex - the exception cause
    • APIException

      public APIException(String message, String code, int statusCode, List<Error> errors)
      APIException constructor.
      Parameters:
      message - the exception message
      code - the exception code
      statusCode - the exception status code
      errors - the errors array
    • APIException

      public APIException(String message, String code, Integer statusCode, List<Error> errors, Throwable ex)
      APIException constructor.
      Parameters:
      message - the exception message
      code - the exception code
      statusCode - the exception status code
      errors - the errors array
      ex - the exception cause
  • Method Details

    • getStatusCode

      public Integer getStatusCode()
      Get status code of the error object.
      Returns:
      statusCode the status code of the error object
    • getCode

      public String getCode()
      Get code of the error object.
      Returns:
      code the code of the error object
    • getMessage

      public String getMessage()
      Get message of the error object.
      Overrides:
      getMessage in class Throwable
      Returns:
      message the message of the error object
    • getErrors

      public List<Error> getErrors()
      Get errors array of the exception.
      Returns:
      errors of the exception