Class GenieExceptionMapper
java.lang.Object
com.netflix.genie.web.apis.rest.v3.controllers.GenieExceptionMapper
Exception mapper for Genie Exceptions.
- Since:
- 3.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionGenieExceptionMapper(io.micrometer.core.instrument.MeterRegistry registry) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<com.netflix.genie.common.exceptions.GeniePreconditionException>handleConstraintViolation(javax.validation.ConstraintViolationException cve) Handle constraint violation exceptions.org.springframework.http.ResponseEntity<com.netflix.genie.common.internal.exceptions.checked.GenieCheckedException>handleGenieCheckedException(com.netflix.genie.common.internal.exceptions.checked.GenieCheckedException e) HandleGenieCheckedExceptioninstances.org.springframework.http.ResponseEntity<com.netflix.genie.common.exceptions.GenieException>handleGenieException(com.netflix.genie.common.exceptions.GenieException e) Handle Genie Exceptions.org.springframework.http.ResponseEntity<com.netflix.genie.common.internal.exceptions.unchecked.GenieRuntimeException>handleGenieRuntimeException(com.netflix.genie.common.internal.exceptions.unchecked.GenieRuntimeException e) Handle Genie runtime exceptions.org.springframework.http.ResponseEntity<com.netflix.genie.common.exceptions.GeniePreconditionException>handleMethodArgumentNotValidException(org.springframework.web.bind.MethodArgumentNotValidException e) Handle MethodArgumentNotValid exceptions.
-
Constructor Details
-
GenieExceptionMapper
@Autowired public GenieExceptionMapper(io.micrometer.core.instrument.MeterRegistry registry) Constructor.- Parameters:
registry- The metrics registry
-
-
Method Details
-
handleGenieException
@ExceptionHandler(com.netflix.genie.common.exceptions.GenieException.class) public org.springframework.http.ResponseEntity<com.netflix.genie.common.exceptions.GenieException> handleGenieException(com.netflix.genie.common.exceptions.GenieException e) Handle Genie Exceptions.- Parameters:
e- The exception to handle- Returns:
- An
ResponseEntityinstance
-
handleGenieRuntimeException
@ExceptionHandler(com.netflix.genie.common.internal.exceptions.unchecked.GenieRuntimeException.class) public org.springframework.http.ResponseEntity<com.netflix.genie.common.internal.exceptions.unchecked.GenieRuntimeException> handleGenieRuntimeException(com.netflix.genie.common.internal.exceptions.unchecked.GenieRuntimeException e) Handle Genie runtime exceptions.- Parameters:
e- The Genie exception to handle- Returns:
- A
ResponseEntitywith the exception mapped to aHttpStatus
-
handleGenieCheckedException
@ExceptionHandler(com.netflix.genie.common.internal.exceptions.checked.GenieCheckedException.class) public org.springframework.http.ResponseEntity<com.netflix.genie.common.internal.exceptions.checked.GenieCheckedException> handleGenieCheckedException(com.netflix.genie.common.internal.exceptions.checked.GenieCheckedException e) HandleGenieCheckedExceptioninstances.- Parameters:
e- The exception to map- Returns:
- A
ResponseEntitywith the exception mapped to aHttpStatus
-
handleConstraintViolation
@ExceptionHandler(javax.validation.ConstraintViolationException.class) public org.springframework.http.ResponseEntity<com.netflix.genie.common.exceptions.GeniePreconditionException> handleConstraintViolation(javax.validation.ConstraintViolationException cve) Handle constraint violation exceptions.- Parameters:
cve- The exception to handle- Returns:
- A
ResponseEntityinstance
-
handleMethodArgumentNotValidException
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<com.netflix.genie.common.exceptions.GeniePreconditionException> handleMethodArgumentNotValidException(org.springframework.web.bind.MethodArgumentNotValidException e) Handle MethodArgumentNotValid exceptions.- Parameters:
e- The exception to handle- Returns:
- A
ResponseEntityinstance
-