Class GenieExceptionMapper

java.lang.Object
com.netflix.genie.web.apis.rest.v3.controllers.GenieExceptionMapper

@ControllerAdvice public class GenieExceptionMapper extends Object
Exception mapper for Genie Exceptions.
Since:
3.0.0
  • Constructor Details

    • GenieExceptionMapper

      @Autowired public GenieExceptionMapper(io.micrometer.core.instrument.MeterRegistry registry)
      Constructor.
      Parameters:
      registry - The metrics registry
  • Method Details

    • 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 a HttpStatus
    • handleGenieCheckedException

      @ExceptionHandler(GenieCheckedException.class) public org.springframework.http.ResponseEntity<GenieCheckedException> handleGenieCheckedException(GenieCheckedException e)
      Handle GenieCheckedException instances.
      Parameters:
      e - The exception to map
      Returns:
      A ResponseEntity with the exception mapped to a HttpStatus
    • handleConstraintViolation

      @ExceptionHandler(jakarta.validation.ConstraintViolationException.class) public org.springframework.http.ResponseEntity<GeniePreconditionException> handleConstraintViolation(jakarta.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