com.holonplatform.http

## Class ErrorResponse.ErrorResponseException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - com.holonplatform.http.ErrorResponse.ErrorResponseException

- All Implemented Interfaces:
    ErrorResponse, Serializable
  Direct Known Subclasses:
    AuthenticationException, AuthorizationException
  Enclosing interface:
    ErrorResponse

      public abstract static class ErrorResponse.ErrorResponseException
      extends RuntimeException
      implements ErrorResponse

  Base class to build a `RuntimeException` with `ErrorResponse` support.
  Since:
    5.0.0
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.http.ErrorResponse

      `ErrorResponse.ErrorResponseException`

  - ### Field Summary

    - ### Fields inherited from interface com.holonplatform.http.ErrorResponse

      `ERROR_CODE_SERIALIZATION_NAME, ERROR_DESCRIPTION_SERIALIZATION_NAME, ERROR_URI_SERIALIZATION_NAME, INVALID_CLIENT, INVALID_REQUEST, INVALID_TOKEN, SERVER_ERROR, TEMPORARY_UNAVAILABLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ErrorResponseException(String errorCode, String errorDescription)` Constructor
    `ErrorResponseException(String errorCode, String errorDescription, int httpStatus)` Constructor
    `ErrorResponseException(String errorCode, String errorDescription, String errorURI)` Constructor
    `ErrorResponseException(String errorCode, String errorDescription, String errorURI, int httpStatus)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getErrorCode()` Error code.
    `String` | `getErrorDescription()` Error description, i.e. a human-readable explanation of this error
    `String` | `getErrorURI()` Optional error URI that leads to further details about this error
    `int` | `getHttpStatus()` Optional HTTP status code to represent error as a HTTP response

    - ### 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

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ErrorResponseException

          public ErrorResponseException(String errorCode,
                                        String errorDescription)

      Constructor
      Parameters:
        `errorCode` - Error code
        `errorDescription` - Error description, i.e. a human-readable explanation of this error

    - #### ErrorResponseException

          public ErrorResponseException(String errorCode,
                                        String errorDescription,
                                        int httpStatus)

      Constructor
      Parameters:
        `errorCode` - Error code
        `errorDescription` - Error description, i.e. a human-readable explanation of this error
        `httpStatus` - HTTP status code to represent error as a HTTP response

    - #### ErrorResponseException

          public ErrorResponseException(String errorCode,
                                        String errorDescription,
                                        String errorURI)

      Constructor
      Parameters:
        `errorCode` - Error code
        `errorDescription` - Error description, i.e. a human-readable explanation of this error
        `errorURI` - Error URI that leads to further details about this error

    - #### ErrorResponseException

          public ErrorResponseException(String errorCode,
                                        String errorDescription,
                                        String errorURI,
                                        int httpStatus)

      Constructor
      Parameters:
        `errorCode` - Error code
        `errorDescription` - Error description, i.e. a human-readable explanation of this error
        `errorURI` - Error URI that leads to further details about this error
        `httpStatus` - HTTP status code to represent error as a HTTP response

  - ### Method Detail

    - #### getErrorCode

          public String getErrorCode()

      Description copied from interface: `ErrorResponse`
      Error code.
      Specified by:
        `getErrorCode` in interface `ErrorResponse`
      Returns:
        Error code

    - #### getErrorDescription

          public String getErrorDescription()

      Description copied from interface: `ErrorResponse`
      Error description, i.e. a human-readable explanation of this error
      Specified by:
        `getErrorDescription` in interface `ErrorResponse`
      Returns:
        Error description

    - #### getErrorURI

          public String getErrorURI()

      Description copied from interface: `ErrorResponse`
      Optional error URI that leads to further details about this error
      Specified by:
        `getErrorURI` in interface `ErrorResponse`
      Returns:
        Error URI

    - #### getHttpStatus

          public int getHttpStatus()

      Description copied from interface: `ErrorResponse`
      Optional HTTP status code to represent error as a HTTP response
      Specified by:
        `getHttpStatus` in interface `ErrorResponse`
      Returns:
        HTTP status code, `-1` means unknown

Copyright © 2017 The Holon Platform. All rights reserved.