Package org.ehrbase.rest.ehrscape
Class EhrScapeExceptionHandler
- java.lang.Object
-
- org.ehrbase.rest.ehrscape.EhrScapeExceptionHandler
-
@RestControllerAdvice(basePackages="org.ehrbase.rest.ehrscape.controller") public class EhrScapeExceptionHandler extends Object
EhrScape API exception handler.- Since:
- 1.0.0
- Author:
- Renaud Subiger
-
-
Constructor Summary
Constructors Constructor Description EhrScapeExceptionHandler()
-
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>handleSpringResponseStatusException(org.springframework.web.server.ResponseStatusException ex)org.springframework.http.ResponseEntity<Object>handleStateConflictException(StateConflictException ex)org.springframework.http.ResponseEntity<Object>handleUncaughtException(Exception ex)org.springframework.http.ResponseEntity<Object>handleUnsupportedMediaTypeException(UnsupportedMediaTypeException ex)
-
-
-
Method Detail
-
handleBadRequestExceptions
@ExceptionHandler({org.springframework.http.converter.HttpMessageNotReadableException.class,org.springframework.web.method.annotation.MethodArgumentTypeMismatchException.class,org.springframework.web.multipart.support.MissingServletRequestPartException.class,org.springframework.validation.BindException.class,org.springframework.web.bind.ServletRequestBindingException.class,java.lang.IllegalArgumentException.class,org.ehrbase.api.exception.GeneralRequestProcessingException.class,org.ehrbase.api.exception.InvalidApiParameterException.class,org.ehrbase.api.exception.UnprocessableEntityException.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.springframework.web.HttpMediaTypeNotAcceptableException.class,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.springframework.web.HttpMediaTypeNotSupportedException.class,org.ehrbase.api.exception.UnsupportedMediaTypeException.class}) public org.springframework.http.ResponseEntity<Object> handleUnsupportedMediaTypeException(UnsupportedMediaTypeException ex)
-
handleSpringResponseStatusException
@ExceptionHandler(org.springframework.web.server.ResponseStatusException.class) public org.springframework.http.ResponseEntity<Object> handleSpringResponseStatusException(org.springframework.web.server.ResponseStatusException ex)
-
handleUncaughtException
@ExceptionHandler(java.lang.Exception.class) public org.springframework.http.ResponseEntity<Object> handleUncaughtException(Exception ex)
-
-