Class ApiException

    • Constructor Detail

      • ApiException

        protected ApiException​(ApiError apiError)
        Construct an API error.
        Parameters:
        apiError - the error code.
      • ApiException

        protected ApiException​(ApiError apiError,
                               String message)
        Construct an API error with a custome message.
        Parameters:
        apiError - the error code.
      • ApiException

        protected ApiException​(ApiError apiError,
                               Throwable orig)
        Construct an API error from a Throwable.
        Parameters:
        apiError - the error code
        orig - the cause of the error
      • ApiException

        protected ApiException​(ApiError apiError,
                               Throwable orig,
                               String message)
        Construct an API error from a Throwable with a custom message.
        Parameters:
        apiError - the error code
        orig - the cause of the error
    • Method Detail

      • getApiError

        public ApiError getApiError()
        Getter for the ApiError.
        Returns:
        the ApiError
      • getErrorCode

        public String getErrorCode()
        Convenience method to retrieve the error code from the contained API error.
        Returns:
        the error code
      • getReason

        public String getReason()
        Convenience method to retrieve the reason from the contained API error.
        Returns:
        the reason