Class ApiExceptionHandler

java.lang.Object
com.aquima.web.api.controller.v2.ApiExceptionHandler

@Component("v2ApiExceptionHandler") @ControllerAdvice(basePackageClasses=AbstractBaseController.class) @ServerContext public class ApiExceptionHandler extends Object
Class defines exception handlers for generic exceptions. These exception can be overwriting when needed by defining a new ControllerAdvice with a bigger precedence Note: It should not contain specific exceptions !
Since:
11.2
Author:
Mihai Bob
  • Field Details Link icon

  • Constructor Details Link icon

    • ApiExceptionHandler Link icon

      public ApiExceptionHandler()
  • Method Details Link icon

    • handleIllegalStateException Link icon

      @ExceptionHandler(java.lang.IllegalStateException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) @ResponseBody public JsonError handleIllegalStateException(IllegalStateException exception)
    • handlePortalException Link icon

      @ExceptionHandler(com.aquima.interactions.portal.exception.PortalException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) @ResponseBody public JsonError handlePortalException(Exception exception)
    • handleAuthorizationException Link icon

      @ExceptionHandler(com.aquima.interactions.portal.exception.FlowAuthorizationException.class) @ResponseBody public org.springframework.http.ResponseEntity<JsonError> handleAuthorizationException(com.aquima.interactions.portal.exception.FlowAuthorizationException exception)
    • handleCsrfException Link icon

      @ExceptionHandler(CsrfException.class) @ResponseStatus(FORBIDDEN) @ResponseBody public JsonError handleCsrfException(CsrfException ex)
    • handleGenericException Link icon

      @ExceptionHandler(java.lang.Exception.class) @ResponseStatus(INTERNAL_SERVER_ERROR) @ResponseBody public JsonError handleGenericException(Exception exception)