Class ExceptionHandlers


  • @Order
    @ControllerAdvice(annotations=org.springframework.web.bind.annotation.RestController.class)
    public class ExceptionHandlers
    extends Object
    Global exception handlers for Crafter REST services.
    Author:
    avasquez
    • Constructor Detail

      • ExceptionHandlers

        public ExceptionHandlers()
    • Method Detail

      • handleInvalidContextException

        @ExceptionHandler(org.springframework.web.bind.MissingServletRequestParameterException.class)
        @ResponseStatus(BAD_REQUEST)
        @ResponseBody
        public Map<String,​Object> handleInvalidContextException​(javax.servlet.http.HttpServletRequest request,
                                                                      org.springframework.web.bind.MissingServletRequestParameterException e)
      • handleInvalidContextException

        @ExceptionHandler(org.craftercms.commons.exceptions.InvalidManagementTokenException.class)
        @ResponseStatus(UNAUTHORIZED)
        @ResponseBody
        public Map<String,​Object> handleInvalidContextException​(javax.servlet.http.HttpServletRequest request,
                                                                      org.craftercms.commons.exceptions.InvalidManagementTokenException e)
      • handleValidationException

        @ExceptionHandler(org.craftercms.commons.validation.ValidationException.class)
        @ResponseStatus(BAD_REQUEST)
        @ResponseBody
        public org.craftercms.commons.validation.ValidationResult handleValidationException​(javax.servlet.http.HttpServletRequest request,
                                                                                            org.craftercms.commons.validation.ValidationException e)
      • handleValidationRuntimeException

        @ExceptionHandler(org.craftercms.commons.validation.ValidationRuntimeException.class)
        @ResponseStatus(BAD_REQUEST)
        @ResponseBody
        public org.craftercms.commons.validation.ValidationResult handleValidationRuntimeException​(javax.servlet.http.HttpServletRequest request,
                                                                                                   org.craftercms.commons.validation.ValidationRuntimeException e)