Class ExceptionHandlers
- java.lang.Object
-
- org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
- org.craftercms.profile.controllers.rest.ExceptionHandlers
-
@ControllerAdvice public class ExceptionHandlers extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
ControllerAdvice
for controllers that includes exception handling for all exceptions.- Author:
- avasquez
-
-
Constructor Summary
Constructors Constructor Description ExceptionHandlers()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<Object>
handleAccessDeniedException(AccessDeniedException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleAccessTokenExistsException(AccessTokenExistsException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleActionDeniedException(org.craftercms.commons.security.exception.ActionDeniedException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleAttributeAlreadyDefinedException(AttributeAlreadyDefinedException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleAttributeNotDefinedDefinedException(AttributeNotDefinedException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleBadCredentialsException(BadCredentialsException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleDisabledProfileException(DisabledProfileException e, org.springframework.web.context.request.WebRequest request)
protected org.springframework.http.ResponseEntity<Object>
handleExceptionInternal(Exception ex, Object body, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)
protected org.springframework.http.ResponseEntity<Object>
handleExceptionInternal(Exception ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, ErrorCode errorCode, org.springframework.web.context.request.WebRequest request)
protected org.springframework.http.ResponseEntity<Object>
handleExceptionInternal(Exception ex, org.springframework.http.HttpStatus status, ErrorCode errorCode, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleInvalidEmailAddressException(InvalidEmailAddressException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleInvalidQueryException(InvalidQueryException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleInvalidTokenManagementException(org.craftercms.commons.exceptions.InvalidManagementTokenException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleNoSuchAccessTokenException(NoSuchAccessTokenException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleNoSuchPersistentLoginException(NoSuchPersistentLoginException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleNoSuchProfileException(NoSuchProfileException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleNoSuchTenantException(NoSuchTenantException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleNoSuchTicketException(NoSuchTicketException.Expired e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleNoSuchTicketException(NoSuchTicketException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleNoSuchVerificationTokenException(NoSuchVerificationTokenException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleParamDeserializationException(ParamDeserializationException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handlePermissionException(org.craftercms.commons.security.exception.PermissionException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleProfileException(ProfileException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleProfileExistsException(ProfileExistsException e, org.springframework.web.context.request.WebRequest request)
org.springframework.http.ResponseEntity<Object>
handleTenantExistsException(TenantExistsException e, org.springframework.web.context.request.WebRequest request)
-
Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
handleAsyncRequestTimeoutException, handleBindException, handleConversionNotSupported, handleException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMethodArgumentNotValid, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleServletRequestBindingException, handleTypeMismatch
-
-
-
-
Method Detail
-
handleInvalidTokenManagementException
@ExceptionHandler(org.craftercms.commons.exceptions.InvalidManagementTokenException.class) public org.springframework.http.ResponseEntity<Object> handleInvalidTokenManagementException(org.craftercms.commons.exceptions.InvalidManagementTokenException e, org.springframework.web.context.request.WebRequest request)
-
handleAccessDeniedException
@ExceptionHandler(AccessDeniedException.class) public org.springframework.http.ResponseEntity<Object> handleAccessDeniedException(AccessDeniedException e, org.springframework.web.context.request.WebRequest request)
-
handleActionDeniedException
@ExceptionHandler(org.craftercms.commons.security.exception.ActionDeniedException.class) public org.springframework.http.ResponseEntity<Object> handleActionDeniedException(org.craftercms.commons.security.exception.ActionDeniedException e, org.springframework.web.context.request.WebRequest request)
-
handleBadCredentialsException
@ExceptionHandler(BadCredentialsException.class) public org.springframework.http.ResponseEntity<Object> handleBadCredentialsException(BadCredentialsException e, org.springframework.web.context.request.WebRequest request)
-
handleDisabledProfileException
@ExceptionHandler(DisabledProfileException.class) public org.springframework.http.ResponseEntity<Object> handleDisabledProfileException(DisabledProfileException e, org.springframework.web.context.request.WebRequest request)
-
handleNoSuchAccessTokenException
@ExceptionHandler(NoSuchAccessTokenException.class) public org.springframework.http.ResponseEntity<Object> handleNoSuchAccessTokenException(NoSuchAccessTokenException e, org.springframework.web.context.request.WebRequest request)
-
handleNoSuchTenantException
@ExceptionHandler(NoSuchTenantException.class) public org.springframework.http.ResponseEntity<Object> handleNoSuchTenantException(NoSuchTenantException e, org.springframework.web.context.request.WebRequest request)
-
handleNoSuchProfileException
@ExceptionHandler(NoSuchProfileException.class) public org.springframework.http.ResponseEntity<Object> handleNoSuchProfileException(NoSuchProfileException e, org.springframework.web.context.request.WebRequest request)
-
handleNoSuchTicketException
@ExceptionHandler(Expired.class) public org.springframework.http.ResponseEntity<Object> handleNoSuchTicketException(NoSuchTicketException.Expired e, org.springframework.web.context.request.WebRequest request)
-
handleNoSuchTicketException
@ExceptionHandler(NoSuchTicketException.class) public org.springframework.http.ResponseEntity<Object> handleNoSuchTicketException(NoSuchTicketException e, org.springframework.web.context.request.WebRequest request)
-
handleNoSuchPersistentLoginException
@ExceptionHandler(NoSuchPersistentLoginException.class) public org.springframework.http.ResponseEntity<Object> handleNoSuchPersistentLoginException(NoSuchPersistentLoginException e, org.springframework.web.context.request.WebRequest request)
-
handleNoSuchVerificationTokenException
@ExceptionHandler(NoSuchVerificationTokenException.class) public org.springframework.http.ResponseEntity<Object> handleNoSuchVerificationTokenException(NoSuchVerificationTokenException e, org.springframework.web.context.request.WebRequest request)
-
handleInvalidEmailAddressException
@ExceptionHandler(InvalidEmailAddressException.class) public org.springframework.http.ResponseEntity<Object> handleInvalidEmailAddressException(InvalidEmailAddressException e, org.springframework.web.context.request.WebRequest request)
-
handlePermissionException
@ExceptionHandler(org.craftercms.commons.security.exception.PermissionException.class) public org.springframework.http.ResponseEntity<Object> handlePermissionException(org.craftercms.commons.security.exception.PermissionException e, org.springframework.web.context.request.WebRequest request)
-
handleAttributeAlreadyDefinedException
@ExceptionHandler(AttributeAlreadyDefinedException.class) public org.springframework.http.ResponseEntity<Object> handleAttributeAlreadyDefinedException(AttributeAlreadyDefinedException e, org.springframework.web.context.request.WebRequest request)
-
handleAttributeNotDefinedDefinedException
@ExceptionHandler(AttributeNotDefinedException.class) public org.springframework.http.ResponseEntity<Object> handleAttributeNotDefinedDefinedException(AttributeNotDefinedException e, org.springframework.web.context.request.WebRequest request)
-
handleParamDeserializationException
@ExceptionHandler(ParamDeserializationException.class) public org.springframework.http.ResponseEntity<Object> handleParamDeserializationException(ParamDeserializationException e, org.springframework.web.context.request.WebRequest request)
-
handleAccessTokenExistsException
@ExceptionHandler(AccessTokenExistsException.class) public org.springframework.http.ResponseEntity<Object> handleAccessTokenExistsException(AccessTokenExistsException e, org.springframework.web.context.request.WebRequest request)
-
handleTenantExistsException
@ExceptionHandler(TenantExistsException.class) public org.springframework.http.ResponseEntity<Object> handleTenantExistsException(TenantExistsException e, org.springframework.web.context.request.WebRequest request)
-
handleProfileExistsException
@ExceptionHandler(ProfileExistsException.class) public org.springframework.http.ResponseEntity<Object> handleProfileExistsException(ProfileExistsException e, org.springframework.web.context.request.WebRequest request)
-
handleInvalidQueryException
@ExceptionHandler(InvalidQueryException.class) public org.springframework.http.ResponseEntity<Object> handleInvalidQueryException(InvalidQueryException e, org.springframework.web.context.request.WebRequest request)
-
handleProfileException
@ExceptionHandler(org.craftercms.profile.api.exceptions.ProfileException.class) public org.springframework.http.ResponseEntity<Object> handleProfileException(ProfileException e, org.springframework.web.context.request.WebRequest request)
-
handleExceptionInternal
protected org.springframework.http.ResponseEntity<Object> handleExceptionInternal(Exception ex, Object body, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)
- Overrides:
handleExceptionInternal
in classorg.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
handleExceptionInternal
protected org.springframework.http.ResponseEntity<Object> handleExceptionInternal(Exception ex, org.springframework.http.HttpStatus status, ErrorCode errorCode, org.springframework.web.context.request.WebRequest request)
-
-