Class GenieExceptionMapper
- java.lang.Object
-
- com.netflix.genie.web.apis.rest.v3.controllers.GenieExceptionMapper
-
@ControllerAdvice public class GenieExceptionMapper extends java.lang.Object
Exception mapper for Genie Exceptions.- Since:
- 3.0.0
-
-
Constructor Summary
Constructors Constructor Description GenieExceptionMapper(io.micrometer.core.instrument.MeterRegistry registry)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<GeniePreconditionException>
handleConstraintViolation(javax.validation.ConstraintViolationException cve)
Handle constraint violation exceptions.org.springframework.http.ResponseEntity<GenieCheckedException>
handleGenieCheckedException(GenieCheckedException e)
HandleGenieCheckedException
instances.org.springframework.http.ResponseEntity<GenieException>
handleGenieException(GenieException e)
Handle Genie Exceptions.org.springframework.http.ResponseEntity<GenieRuntimeException>
handleGenieRuntimeException(GenieRuntimeException e)
Handle Genie runtime exceptions.org.springframework.http.ResponseEntity<GeniePreconditionException>
handleMethodArgumentNotValidException(org.springframework.web.bind.MethodArgumentNotValidException e)
Handle MethodArgumentNotValid exceptions.
-
-
-
Method Detail
-
handleGenieException
@ExceptionHandler(GenieException.class) public org.springframework.http.ResponseEntity<GenieException> handleGenieException(GenieException e)
Handle Genie Exceptions.- Parameters:
e
- The exception to handle- Returns:
- An
ResponseEntity
instance
-
handleGenieRuntimeException
@ExceptionHandler(GenieRuntimeException.class) public org.springframework.http.ResponseEntity<GenieRuntimeException> handleGenieRuntimeException(GenieRuntimeException e)
Handle Genie runtime exceptions.- Parameters:
e
- The Genie exception to handle- Returns:
- A
ResponseEntity
with the exception mapped to aHttpStatus
-
handleGenieCheckedException
@ExceptionHandler(GenieCheckedException.class) public org.springframework.http.ResponseEntity<GenieCheckedException> handleGenieCheckedException(GenieCheckedException e)
HandleGenieCheckedException
instances.- Parameters:
e
- The exception to map- Returns:
- A
ResponseEntity
with the exception mapped to aHttpStatus
-
handleConstraintViolation
@ExceptionHandler(javax.validation.ConstraintViolationException.class) public org.springframework.http.ResponseEntity<GeniePreconditionException> handleConstraintViolation(javax.validation.ConstraintViolationException cve)
Handle constraint violation exceptions.- Parameters:
cve
- The exception to handle- Returns:
- A
ResponseEntity
instance
-
handleMethodArgumentNotValidException
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<GeniePreconditionException> handleMethodArgumentNotValidException(org.springframework.web.bind.MethodArgumentNotValidException e)
Handle MethodArgumentNotValid exceptions.- Parameters:
e
- The exception to handle- Returns:
- A
ResponseEntity
instance
-
-