Package pro.taskana.common.rest
Class TaskanaRestExceptionHandler
- java.lang.Object
-
- org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
- pro.taskana.common.rest.TaskanaRestExceptionHandler
-
@Order(-2147483648) @ControllerAdvice public class TaskanaRestExceptionHandler extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandlerThis class handles taskana exceptions.
-
-
Constructor Summary
Constructors Constructor Description TaskanaRestExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.http.ResponseEntity<Object>handleBindException(org.springframework.validation.BindException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)protected org.springframework.http.ResponseEntity<Object>handleClassificationAlreadyExist(pro.taskana.classification.api.exceptions.ClassificationAlreadyExistException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleConcurrencyException(pro.taskana.common.api.exceptions.ConcurrencyException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleDomainNotFound(pro.taskana.common.api.exceptions.DomainNotFoundException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleDuplicateKey(org.springframework.dao.DuplicateKeyException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleGeneralException(Exception ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleInvalidArgument(pro.taskana.common.api.exceptions.InvalidArgumentException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleInvalidOwner(pro.taskana.task.api.exceptions.InvalidOwnerException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleInvalidState(pro.taskana.task.api.exceptions.InvalidStateException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleInvalidWorkbasket(pro.taskana.workbasket.api.exceptions.InvalidWorkbasketException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleMaxUploadSizeExceededException(org.springframework.web.multipart.MaxUploadSizeExceededException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleNotAuthorized(pro.taskana.common.api.exceptions.NotAuthorizedException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleNotAuthorizedToQueryWorkbasket(pro.taskana.workbasket.api.exceptions.NotAuthorizedToQueryWorkbasketException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleTaskAlreadyExist(pro.taskana.task.api.exceptions.TaskAlreadyExistException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleTaskNotFound(pro.taskana.common.api.exceptions.NotFoundException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleWorkbasketAccessItemAlreadyExist(pro.taskana.workbasket.api.exceptions.WorkbasketAccessItemAlreadyExistException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleWorkbasketAlreadyExist(pro.taskana.workbasket.api.exceptions.WorkbasketAlreadyExistException ex, org.springframework.web.context.request.WebRequest req)protected org.springframework.http.ResponseEntity<Object>handleWorkbasketInUse(pro.taskana.workbasket.api.exceptions.WorkbasketInUseException ex, org.springframework.web.context.request.WebRequest req)-
Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
handleAsyncRequestTimeoutException, handleConversionNotSupported, handleException, handleExceptionInternal, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMethodArgumentNotValid, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleServletRequestBindingException, handleTypeMismatch
-
-
-
-
Method Detail
-
handleInvalidArgument
@ExceptionHandler(pro.taskana.common.api.exceptions.InvalidArgumentException.class) protected org.springframework.http.ResponseEntity<Object> handleInvalidArgument(pro.taskana.common.api.exceptions.InvalidArgumentException ex, org.springframework.web.context.request.WebRequest req)
-
handleNotAuthorized
@ExceptionHandler(pro.taskana.common.api.exceptions.NotAuthorizedException.class) protected org.springframework.http.ResponseEntity<Object> handleNotAuthorized(pro.taskana.common.api.exceptions.NotAuthorizedException ex, org.springframework.web.context.request.WebRequest req)
-
handleTaskNotFound
@ExceptionHandler(pro.taskana.common.api.exceptions.NotFoundException.class) protected org.springframework.http.ResponseEntity<Object> handleTaskNotFound(pro.taskana.common.api.exceptions.NotFoundException ex, org.springframework.web.context.request.WebRequest req)
-
handleTaskAlreadyExist
@ExceptionHandler(pro.taskana.task.api.exceptions.TaskAlreadyExistException.class) protected org.springframework.http.ResponseEntity<Object> handleTaskAlreadyExist(pro.taskana.task.api.exceptions.TaskAlreadyExistException ex, org.springframework.web.context.request.WebRequest req)
-
handleNotAuthorizedToQueryWorkbasket
@ExceptionHandler(pro.taskana.workbasket.api.exceptions.NotAuthorizedToQueryWorkbasketException.class) protected org.springframework.http.ResponseEntity<Object> handleNotAuthorizedToQueryWorkbasket(pro.taskana.workbasket.api.exceptions.NotAuthorizedToQueryWorkbasketException ex, org.springframework.web.context.request.WebRequest req)
-
handleInvalidState
@ExceptionHandler(pro.taskana.task.api.exceptions.InvalidStateException.class) protected org.springframework.http.ResponseEntity<Object> handleInvalidState(pro.taskana.task.api.exceptions.InvalidStateException ex, org.springframework.web.context.request.WebRequest req)
-
handleInvalidOwner
@ExceptionHandler(pro.taskana.task.api.exceptions.InvalidOwnerException.class) protected org.springframework.http.ResponseEntity<Object> handleInvalidOwner(pro.taskana.task.api.exceptions.InvalidOwnerException ex, org.springframework.web.context.request.WebRequest req)
-
handleClassificationAlreadyExist
@ExceptionHandler(pro.taskana.classification.api.exceptions.ClassificationAlreadyExistException.class) protected org.springframework.http.ResponseEntity<Object> handleClassificationAlreadyExist(pro.taskana.classification.api.exceptions.ClassificationAlreadyExistException ex, org.springframework.web.context.request.WebRequest req)
-
handleDuplicateKey
@ExceptionHandler(org.springframework.dao.DuplicateKeyException.class) protected org.springframework.http.ResponseEntity<Object> handleDuplicateKey(org.springframework.dao.DuplicateKeyException ex, org.springframework.web.context.request.WebRequest req)
-
handleConcurrencyException
@ExceptionHandler(pro.taskana.common.api.exceptions.ConcurrencyException.class) protected org.springframework.http.ResponseEntity<Object> handleConcurrencyException(pro.taskana.common.api.exceptions.ConcurrencyException ex, org.springframework.web.context.request.WebRequest req)
-
handleWorkbasketInUse
@ExceptionHandler(pro.taskana.workbasket.api.exceptions.WorkbasketInUseException.class) protected org.springframework.http.ResponseEntity<Object> handleWorkbasketInUse(pro.taskana.workbasket.api.exceptions.WorkbasketInUseException ex, org.springframework.web.context.request.WebRequest req)
-
handleWorkbasketAlreadyExist
@ExceptionHandler(pro.taskana.workbasket.api.exceptions.WorkbasketAlreadyExistException.class) protected org.springframework.http.ResponseEntity<Object> handleWorkbasketAlreadyExist(pro.taskana.workbasket.api.exceptions.WorkbasketAlreadyExistException ex, org.springframework.web.context.request.WebRequest req)
-
handleWorkbasketAccessItemAlreadyExist
@ExceptionHandler(pro.taskana.workbasket.api.exceptions.WorkbasketAccessItemAlreadyExistException.class) protected org.springframework.http.ResponseEntity<Object> handleWorkbasketAccessItemAlreadyExist(pro.taskana.workbasket.api.exceptions.WorkbasketAccessItemAlreadyExistException ex, org.springframework.web.context.request.WebRequest req)
-
handleInvalidWorkbasket
@ExceptionHandler(pro.taskana.workbasket.api.exceptions.InvalidWorkbasketException.class) protected org.springframework.http.ResponseEntity<Object> handleInvalidWorkbasket(pro.taskana.workbasket.api.exceptions.InvalidWorkbasketException ex, org.springframework.web.context.request.WebRequest req)
-
handleDomainNotFound
@ExceptionHandler(pro.taskana.common.api.exceptions.DomainNotFoundException.class) protected org.springframework.http.ResponseEntity<Object> handleDomainNotFound(pro.taskana.common.api.exceptions.DomainNotFoundException ex, org.springframework.web.context.request.WebRequest req)
-
handleMaxUploadSizeExceededException
@ExceptionHandler(org.springframework.web.multipart.MaxUploadSizeExceededException.class) protected org.springframework.http.ResponseEntity<Object> handleMaxUploadSizeExceededException(org.springframework.web.multipart.MaxUploadSizeExceededException ex, org.springframework.web.context.request.WebRequest req)
-
handleBindException
protected org.springframework.http.ResponseEntity<Object> handleBindException(org.springframework.validation.BindException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request)
- Overrides:
handleBindExceptionin classorg.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
handleGeneralException
@ExceptionHandler(java.lang.Exception.class) protected org.springframework.http.ResponseEntity<Object> handleGeneralException(Exception ex, org.springframework.web.context.request.WebRequest req)
-
-