java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
org.qubership.integration.platform.variables.management.rest.exception.GlobalExceptionHandler
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.MessageSourceAware

@ControllerAdvice public class GlobalExceptionHandler extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
  • Constructor Details

    • GlobalExceptionHandler

      public GlobalExceptionHandler()
  • Method Details

    • handleGeneralException

      @ExceptionHandler public org.springframework.http.ResponseEntity<ExceptionDTO> handleGeneralException(Exception exception)
    • handleEntityNotFound

      @ExceptionHandler(jakarta.persistence.EntityNotFoundException.class) public org.springframework.http.ResponseEntity<ExceptionDTO> handleEntityNotFound()
    • handleEntityExistsException

      @ExceptionHandler(jakarta.persistence.EntityExistsException.class) public org.springframework.http.ResponseEntity<ExceptionDTO> handleEntityExistsException(jakarta.persistence.EntityExistsException exception)
    • handleApiException

      @ExceptionHandler(KubeApiException.class) public org.springframework.http.ResponseEntity<ExceptionDTO> handleApiException(VariablesManagementRuntimeException exception)
    • handleEmptyVariableFieldException

      @ExceptionHandler(EmptyVariableFieldException.class) public org.springframework.http.ResponseEntity<ExceptionDTO> handleEmptyVariableFieldException(EmptyVariableFieldException exception)
    • handleMalformedVariableNameException

      @ExceptionHandler(MalformedVariableNameException.class) public org.springframework.http.ResponseEntity<ExceptionDTO> handleMalformedVariableNameException(MalformedVariableNameException exception)
    • handleSecuredVariablesException

      @ExceptionHandler(SecuredVariablesException.class) public org.springframework.http.ResponseEntity<ExceptionDTO> handleSecuredVariablesException(SecuredVariablesException exception)
    • handleConsulException

      @ExceptionHandler(ConsulException.class) public org.springframework.http.ResponseEntity<ExceptionDTO> handleConsulException(ConsulException exception)
    • handleTxnConflictException

      @ExceptionHandler(TxnConflictException.class) public org.springframework.http.ResponseEntity<ExceptionDTO> handleTxnConflictException(TxnConflictException exception)
    • handleSecuredVariablesNotFoundException

      @ExceptionHandler(SecuredVariablesNotFoundException.class) public org.springframework.http.ResponseEntity<ExceptionDTO> handleSecuredVariablesNotFoundException(SecuredVariablesNotFoundException exception)
    • handleConstraintViolationException

      @ExceptionHandler(jakarta.validation.ConstraintViolationException.class) public org.springframework.http.ResponseEntity<ExceptionDTO> handleConstraintViolationException(jakarta.validation.ConstraintViolationException exception)
    • handleMethodArgumentNotValid

      public org.springframework.http.ResponseEntity<Object> handleMethodArgumentNotValid(org.springframework.web.bind.MethodArgumentNotValidException exception, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode status, org.springframework.web.context.request.WebRequest request)
      Overrides:
      handleMethodArgumentNotValid in class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
    • createResponseEntity

      protected org.springframework.http.ResponseEntity<Object> createResponseEntity(@Nullable Object body, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode statusCode, org.springframework.web.context.request.WebRequest request)
      Overrides:
      createResponseEntity in class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler