Class ExceptionResponse


  • public final class ExceptionResponse
    extends Object

    Wraps all WebExceptions thrown by controlled workflow. If unexpected Exceptions occur a general InternalServerException should be wrapped so that all exceptions interrupting the expected workflow can be serialized and returned to the requesting user/service.

    To ensure all exceptions are handled and communicated to the user all Web bindings shall inherit from BaseController which is configured by default to serve as a central ExceptionHandler.

    • Method Detail

      • getStatusCode

        public int getStatusCode()
      • getReason

        public String getReason()
      • getUserMessage

        public String getUserMessage()
      • getDeveloperMessage

        public String getDeveloperMessage()
      • getHints

        public String[] getHints()
      • createExceptionResponse

        public static ExceptionResponse createExceptionResponse​(WebException e,
                                                                org.springframework.http.HttpStatus statusCode)