Class ExceptionHandlers


  • @Order(-2147483648)
    @ControllerAdvice
    public class ExceptionHandlers
    extends org.craftercms.commons.validation.rest.ValidationAwareRestExceptionHandlers
    Extension of BaseRestExceptionHandlers that provides exception handlers for specific Crafter Deployer exceptions.
    Author:
    avasquez
    • Field Summary

      • Fields inherited from class org.craftercms.commons.validation.rest.ValidationAwareRestExceptionHandlers

        errorMessageBundle
      • Fields inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

        logger, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger
    • Constructor Detail

      • ExceptionHandlers

        public ExceptionHandlers()
    • Method Detail

      • handleTargetNotFoundException

        @ExceptionHandler(TargetNotFoundException.class)
        public org.springframework.http.ResponseEntity<Object> handleTargetNotFoundException​(TargetNotFoundException ex,
                                                                                             org.springframework.web.context.request.WebRequest request)
        Handles a TargetNotFoundException by returning a 404 NOT FOUND.
        Parameters:
        ex - the exception
        request - the current request
        Returns:
        the response entity, with the body and status
      • handleInvalidManagementTokenException

        @ExceptionHandler(org.craftercms.commons.exceptions.InvalidManagementTokenException.class)
        public org.springframework.http.ResponseEntity<Object> handleInvalidManagementTokenException​(org.craftercms.commons.exceptions.InvalidManagementTokenException ex,
                                                                                                     org.springframework.web.context.request.WebRequest request)