Package org.ehrbase.rest
Class DefaultExceptionHandler
- java.lang.Object
-
- org.ehrbase.rest.DefaultExceptionHandler
-
@RestControllerAdvice(basePackages={"org.ehrbase.rest.openehr","org.ehrbase.rest.admin"}) public class DefaultExceptionHandler extends ObjectDefault exception handler.- Since:
- 1.0.0
- Author:
- Renaud Subiger
-
-
Constructor Summary
Constructors Constructor Description DefaultExceptionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<Object>handleBadRequestExceptions(Exception ex)org.springframework.http.ResponseEntity<Object>handleNotAcceptableException(NotAcceptableException ex)org.springframework.http.ResponseEntity<Object>handleObjectNotFoundException(ObjectNotFoundException ex)org.springframework.http.ResponseEntity<Object>handlePreconditionFailedException(PreconditionFailedException ex)org.springframework.http.ResponseEntity<Object>handleStateConflictException(StateConflictException ex)org.springframework.http.ResponseEntity<Object>handleUncaughtException(Exception ex)org.springframework.http.ResponseEntity<Object>handleUnprocessableEntityException(UnprocessableEntityException ex, org.springframework.web.context.request.WebRequest request)org.springframework.http.ResponseEntity<Object>handleUnsupportedMediaTypeException(UnsupportedMediaTypeException ex)
-
-
-
Method Detail
-
handleBadRequestExceptions
@ExceptionHandler({org.ehrbase.api.exception.GeneralRequestProcessingException.class,org.springframework.http.converter.HttpMessageNotReadableException.class,org.ehrbase.api.exception.InvalidApiParameterException.class,java.lang.IllegalArgumentException.class,org.springframework.web.method.annotation.MethodArgumentTypeMismatchException.class,org.springframework.web.bind.MissingServletRequestParameterException.class,org.ehrbase.api.exception.ValidationException.class,org.ehrbase.serialisation.exception.UnmarshalException.class}) public org.springframework.http.ResponseEntity<Object> handleBadRequestExceptions(Exception ex)
-
handleObjectNotFoundException
@ExceptionHandler(org.ehrbase.api.exception.ObjectNotFoundException.class) public org.springframework.http.ResponseEntity<Object> handleObjectNotFoundException(ObjectNotFoundException ex)
-
handleNotAcceptableException
@ExceptionHandler(org.ehrbase.api.exception.NotAcceptableException.class) public org.springframework.http.ResponseEntity<Object> handleNotAcceptableException(NotAcceptableException ex)
-
handleStateConflictException
@ExceptionHandler(org.ehrbase.api.exception.StateConflictException.class) public org.springframework.http.ResponseEntity<Object> handleStateConflictException(StateConflictException ex)
-
handlePreconditionFailedException
@ExceptionHandler(org.ehrbase.api.exception.PreconditionFailedException.class) public org.springframework.http.ResponseEntity<Object> handlePreconditionFailedException(PreconditionFailedException ex)
-
handleUnsupportedMediaTypeException
@ExceptionHandler(org.ehrbase.api.exception.UnsupportedMediaTypeException.class) public org.springframework.http.ResponseEntity<Object> handleUnsupportedMediaTypeException(UnsupportedMediaTypeException ex)
-
handleUnprocessableEntityException
@ExceptionHandler(org.ehrbase.api.exception.UnprocessableEntityException.class) public org.springframework.http.ResponseEntity<Object> handleUnprocessableEntityException(UnprocessableEntityException ex, org.springframework.web.context.request.WebRequest request)
-
handleUncaughtException
@ExceptionHandler(java.lang.Exception.class) public org.springframework.http.ResponseEntity<Object> handleUncaughtException(Exception ex)
-
-