Package pro.taskana.common.rest
Class TaskanaRestExceptionHandler
java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
pro.taskana.common.rest.TaskanaRestExceptionHandler
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.MessageSourceAware
@Order(-2147483648)
@ControllerAdvice
public class TaskanaRestExceptionHandler
extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
This class handles TASKANA exceptions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsFields inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
logger, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.http.ResponseEntity<Object>handleBeanInstantiationException(org.springframework.beans.BeanInstantiationException 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>handleIllegalArgumentException(IllegalArgumentException ex, org.springframework.web.context.request.WebRequest req) protected org.springframework.http.ResponseEntity<Object>handleMaxUploadSizeExceededException(org.springframework.web.multipart.MaxUploadSizeExceededException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request) protected org.springframework.http.ResponseEntity<Object>handleMethodArgumentNotValid(org.springframework.web.bind.MethodArgumentNotValidException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request) protected org.springframework.http.ResponseEntity<Object>handleTaskanaException(pro.taskana.common.api.exceptions.TaskanaException ex, org.springframework.web.context.request.WebRequest req) protected org.springframework.http.ResponseEntity<Object>handleTaskanaRuntimeException(pro.taskana.common.api.exceptions.TaskanaRuntimeException ex, org.springframework.web.context.request.WebRequest req) Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
createProblemDetail, createResponseEntity, getMessageSource, handleAsyncRequestTimeoutException, handleBindException, handleConversionNotSupported, handleErrorResponseException, handleException, handleExceptionInternal, handleHandlerMethodValidationException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMethodValidationException, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleNoResourceFoundException, handleServletRequestBindingException, handleTypeMismatch, setMessageSource
-
Field Details
-
ERROR_KEY_QUERY_MALFORMED
- See Also:
-
ERROR_KEY_PAYLOAD
- See Also:
-
ERROR_KEY_UNKNOWN_ERROR
- See Also:
-
-
Constructor Details
-
TaskanaRestExceptionHandler
public TaskanaRestExceptionHandler()
-
-
Method Details
-
handleMaxUploadSizeExceededException
protected org.springframework.http.ResponseEntity<Object> handleMaxUploadSizeExceededException(org.springframework.web.multipart.MaxUploadSizeExceededException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request) - Overrides:
handleMaxUploadSizeExceededExceptionin classorg.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
handleBeanInstantiationException
@ExceptionHandler(org.springframework.beans.BeanInstantiationException.class) protected org.springframework.http.ResponseEntity<Object> handleBeanInstantiationException(org.springframework.beans.BeanInstantiationException ex, org.springframework.web.context.request.WebRequest req) -
handleIllegalArgumentException
@ExceptionHandler(java.lang.IllegalArgumentException.class) protected org.springframework.http.ResponseEntity<Object> handleIllegalArgumentException(IllegalArgumentException ex, org.springframework.web.context.request.WebRequest req) -
handleTaskanaRuntimeException
@ExceptionHandler(pro.taskana.common.api.exceptions.TaskanaRuntimeException.class) protected org.springframework.http.ResponseEntity<Object> handleTaskanaRuntimeException(pro.taskana.common.api.exceptions.TaskanaRuntimeException ex, org.springframework.web.context.request.WebRequest req) -
handleTaskanaException
@ExceptionHandler(pro.taskana.common.api.exceptions.TaskanaException.class) protected org.springframework.http.ResponseEntity<Object> handleTaskanaException(pro.taskana.common.api.exceptions.TaskanaException ex, org.springframework.web.context.request.WebRequest req) -
handleGeneralException
@ExceptionHandler(java.lang.Exception.class) protected org.springframework.http.ResponseEntity<Object> handleGeneralException(Exception ex, org.springframework.web.context.request.WebRequest req) -
handleMethodArgumentNotValid
@NonNull protected org.springframework.http.ResponseEntity<Object> handleMethodArgumentNotValid(org.springframework.web.bind.MethodArgumentNotValidException ex, @NonNull org.springframework.http.HttpHeaders headers, @NonNull org.springframework.http.HttpStatusCode status, @NonNull org.springframework.web.context.request.WebRequest request) - Overrides:
handleMethodArgumentNotValidin classorg.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-