Class ApiException

    • Constructor Summary

      Constructors 
      Constructor Description
      ApiException​(int statusCode, java.lang.String error, java.lang.String description)
      Constructs a new ApiException with specified status code, error and description.
      ApiException​(int statusCode, java.lang.String error, java.lang.String description, java.lang.Throwable cause)
      Constructs a new ApiException with specified status code, error and description.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getError()
      Gets the error/name of the exception.
      int getStatusCode()
      Gets the status code of the exception.
      • 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 error,
                            java.lang.String description)
        Constructs a new ApiException with specified status code, error and description.
        Parameters:
        statusCode - The status code of the exception. Maps to HTTP status codes.
        error - The error/name of the exception.
        description - The reason and description for the exception.
      • ApiException

        public ApiException​(int statusCode,
                            java.lang.String error,
                            java.lang.String description,
                            java.lang.Throwable cause)
        Constructs a new ApiException with specified status code, error and description.
        Parameters:
        statusCode - The status code of the exception. Maps to HTTP status codes.
        error - The error/name of the exception.
        description - The reason and description for the exception.
        cause - The underlying cause of the error case.
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Gets the status code of the exception.
        Returns:
        The status code.
      • getError

        public java.lang.String getError()
        Gets the error/name of the exception.
        Returns:
        The error.