Class ExceptionHandlers
- java.lang.Object
-
- org.craftercms.core.controller.rest.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 Summary
Constructors Constructor Description ExceptionHandlers()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>handleAuthenticationException(javax.servlet.http.HttpServletRequest request, AuthenticationException e)Map<String,Object>handleException(javax.servlet.http.HttpServletRequest request, Exception e)Map<String,Object>handleForbiddenPathException(javax.servlet.http.HttpServletRequest request, ForbiddenPathException e)Map<String,Object>handleInvalidContextException(javax.servlet.http.HttpServletRequest request, org.craftercms.commons.exceptions.InvalidManagementTokenException e)Map<String,Object>handleInvalidContextException(javax.servlet.http.HttpServletRequest request, InvalidContextException e)Map<String,Object>handleInvalidContextException(javax.servlet.http.HttpServletRequest request, org.springframework.web.bind.MissingServletRequestParameterException e)Map<String,Object>handlePathNotFoundException(javax.servlet.http.HttpServletRequest request, PathNotFoundException e)org.craftercms.commons.validation.ValidationResulthandleValidationException(javax.servlet.http.HttpServletRequest request, org.craftercms.commons.validation.ValidationException e)org.craftercms.commons.validation.ValidationResulthandleValidationRuntimeException(javax.servlet.http.HttpServletRequest request, org.craftercms.commons.validation.ValidationRuntimeException e)
-
-
-
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)
-
handleInvalidContextException
@ExceptionHandler(InvalidContextException.class) @ResponseStatus(BAD_REQUEST) @ResponseBody public Map<String,Object> handleInvalidContextException(javax.servlet.http.HttpServletRequest request, InvalidContextException e)
-
handleAuthenticationException
@ExceptionHandler(AuthenticationException.class) @ResponseStatus(UNAUTHORIZED) @ResponseBody public Map<String,Object> handleAuthenticationException(javax.servlet.http.HttpServletRequest request, AuthenticationException e)
-
handlePathNotFoundException
@ExceptionHandler(PathNotFoundException.class) @ResponseStatus(NOT_FOUND) @ResponseBody public Map<String,Object> handlePathNotFoundException(javax.servlet.http.HttpServletRequest request, PathNotFoundException e)
-
handleForbiddenPathException
@ExceptionHandler(ForbiddenPathException.class) @ResponseStatus(FORBIDDEN) @ResponseBody public Map<String,Object> handleForbiddenPathException(javax.servlet.http.HttpServletRequest request, ForbiddenPathException 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)
-
handleException
@ExceptionHandler(java.lang.Exception.class) @ResponseStatus(INTERNAL_SERVER_ERROR) @ResponseBody public Map<String,Object> handleException(javax.servlet.http.HttpServletRequest request, Exception e)
-
-