Class EnvironmentRestExceptionHandler
java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
com.chutneytesting.environment.api.EnvironmentRestExceptionHandler
@ControllerAdvice
public class EnvironmentRestExceptionHandler
extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
Field Summary
Fields 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 TypeMethodDescriptionorg.springframework.http.ResponseEntity<Object>_500(RuntimeException ex, org.springframework.web.context.request.WebRequest request) protected org.springframework.http.ResponseEntity<Object>badRequest(RuntimeException ex, org.springframework.web.context.request.WebRequest request) protected org.springframework.http.ResponseEntity<Object>conflict(RuntimeException ex, org.springframework.web.context.request.WebRequest request) protected org.springframework.http.ResponseEntity<Object>forbidden(RuntimeException ex, org.springframework.web.context.request.WebRequest request) protected org.springframework.http.ResponseEntity<Object>handleHttpMessageNotReadable(org.springframework.http.converter.HttpMessageNotReadableException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request) protected org.springframework.http.ResponseEntity<Object>handleHttpMessageNotWritable(org.springframework.http.converter.HttpMessageNotWritableException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request) protected org.springframework.http.ResponseEntity<Object>notFound(RuntimeException ex, org.springframework.web.context.request.WebRequest request) Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
handleAsyncRequestTimeoutException, handleBindException, handleConversionNotSupported, handleException, handleExceptionInternal, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpRequestMethodNotSupported, handleMethodArgumentNotValid, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleServletRequestBindingException, handleTypeMismatch
-
Constructor Details
-
EnvironmentRestExceptionHandler
public EnvironmentRestExceptionHandler()
-
-
Method Details
-
handleHttpMessageNotReadable
protected org.springframework.http.ResponseEntity<Object> handleHttpMessageNotReadable(org.springframework.http.converter.HttpMessageNotReadableException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request) - Overrides:
handleHttpMessageNotReadablein classorg.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
handleHttpMessageNotWritable
protected org.springframework.http.ResponseEntity<Object> handleHttpMessageNotWritable(org.springframework.http.converter.HttpMessageNotWritableException ex, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatus status, org.springframework.web.context.request.WebRequest request) - Overrides:
handleHttpMessageNotWritablein classorg.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-
_500
@ExceptionHandler(java.lang.RuntimeException.class) public org.springframework.http.ResponseEntity<Object> _500(RuntimeException ex, org.springframework.web.context.request.WebRequest request) -
notFound
@ExceptionHandler({TargetNotFoundException.class,EnvironmentNotFoundException.class}) protected org.springframework.http.ResponseEntity<Object> notFound(RuntimeException ex, org.springframework.web.context.request.WebRequest request) -
conflict
@ExceptionHandler({AlreadyExistingTargetException.class,AlreadyExistingEnvironmentException.class}) protected org.springframework.http.ResponseEntity<Object> conflict(RuntimeException ex, org.springframework.web.context.request.WebRequest request) -
badRequest
@ExceptionHandler({java.time.format.DateTimeParseException.class,InvalidEnvironmentNameException.class}) protected org.springframework.http.ResponseEntity<Object> badRequest(RuntimeException ex, org.springframework.web.context.request.WebRequest request) -
forbidden
@ExceptionHandler(java.lang.IllegalArgumentException.class) protected org.springframework.http.ResponseEntity<Object> forbidden(RuntimeException ex, org.springframework.web.context.request.WebRequest request)
-