Class GlobalExceptionHandler
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
-
Field Summary
Fields inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
logger, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.http.ResponseEntity<Object> createResponseEntity(Object body, org.springframework.http.HttpHeaders headers, org.springframework.http.HttpStatusCode statusCode, org.springframework.web.context.request.WebRequest request) org.springframework.http.ResponseEntity<ExceptionDTO> org.springframework.http.ResponseEntity<ExceptionDTO> handleConstraintViolationException(jakarta.validation.ConstraintViolationException exception) org.springframework.http.ResponseEntity<ExceptionDTO> handleConsulException(ConsulException exception) org.springframework.http.ResponseEntity<ExceptionDTO> org.springframework.http.ResponseEntity<ExceptionDTO> handleEntityExistsException(jakarta.persistence.EntityExistsException exception) org.springframework.http.ResponseEntity<ExceptionDTO> org.springframework.http.ResponseEntity<ExceptionDTO> handleGeneralException(Exception exception) org.springframework.http.ResponseEntity<ExceptionDTO> 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) org.springframework.http.ResponseEntity<ExceptionDTO> org.springframework.http.ResponseEntity<ExceptionDTO> org.springframework.http.ResponseEntity<ExceptionDTO> handleTxnConflictException(TxnConflictException exception) Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
createProblemDetail, getMessageSource, handleAsyncRequestNotUsableException, handleAsyncRequestTimeoutException, handleConversionNotSupported, handleErrorResponseException, handleException, handleExceptionInternal, handleHandlerMethodValidationException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMaxUploadSizeExceededException, handleMethodValidationException, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleNoResourceFoundException, handleServletRequestBindingException, handleTypeMismatch, setMessageSource
-
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:
handleMethodArgumentNotValidin classorg.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:
createResponseEntityin classorg.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
-