Uploaded image for project: 'appNG'
  1. appNG
  2. APPNG-2157

Lack of support for Spring MVC style error handling for @(Rest)Controller

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.17.1
    • Component/s: appng-core
    • Labels:
      None

      Description

      We have two possibilities here:

      • support @ExceptionHandler/ @ControllerAdvice
        • Requires a ExceptionHandlerExceptionResolver
        • Would allow multiple Exception Handler Methods like
          @ExceptionHandler(BusinessException.class)
          public ResponseEntity<?> handleError(Site site, Application application, Environment environment, HttpServletRequest request, HttpServletResponse response) {...}
      • support custom ResponseEntityExceptionHandlers, maybe a custom one that also can take appNG Types like Site, Application, Environment as an argument.

      See also http://www.baeldung.com/exception-handling-for-rest-with-spring

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mueller.matthias Matthias Müller
                Reporter:
                mueller.matthias Matthias Müller
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: