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 Summary

    Constructors
    Constructor
    Description
    GenieExceptionMapper(io.micrometer.core.instrument.MeterRegistry registry)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.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)
    Handle GenieCheckedException instances.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 ResponseEntity instance
    • 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 ResponseEntity with the exception mapped to a HttpStatus
    • 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)
      Handle GenieCheckedException instances.
      Parameters:
      e - The exception to map
      Returns:
      A ResponseEntity with the exception mapped to a HttpStatus
    • 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 ResponseEntity instance
    • 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 ResponseEntity instance