Class GlobalExceptionHandler
java.lang.Object
com.v1rex.liftnexus.common.exception.GlobalExceptionHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleConstraintViolationException(jakarta.validation.ConstraintViolationException ex, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleDataIntegrityViolation(org.springframework.dao.DataIntegrityViolationException ex, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleDomainException(DomainException ex, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleGeneralException(Exception ex, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleMaxUploadSizeExceeded(org.springframework.web.multipart.MaxUploadSizeExceededException ex, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleMediaTypeNotAcceptable(org.springframework.web.HttpMediaTypeNotAcceptableException ex, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleMediaTypeNotSupported(org.springframework.web.HttpMediaTypeNotSupportedException ex, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleMethodNotSupported(org.springframework.web.HttpRequestMethodNotSupportedException ex, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleMissingParameter(org.springframework.web.bind.MissingServletRequestParameterException ex, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleTypeMismatch(org.springframework.web.method.annotation.MethodArgumentTypeMismatchException ex, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleUnreadableMessage(org.springframework.http.converter.HttpMessageNotReadableException ex, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleValidationException(org.springframework.web.bind.MethodArgumentNotValidException ex, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleWritableException(org.springframework.http.converter.HttpMessageNotWritableException ex, jakarta.servlet.http.HttpServletRequest request)
-
Constructor Details
-
GlobalExceptionHandler
public GlobalExceptionHandler()
-
-
Method Details
-
handleValidationException
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleValidationException(org.springframework.web.bind.MethodArgumentNotValidException ex, jakarta.servlet.http.HttpServletRequest request) -
handleConstraintViolationException
@ExceptionHandler(jakarta.validation.ConstraintViolationException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleConstraintViolationException(jakarta.validation.ConstraintViolationException ex, jakarta.servlet.http.HttpServletRequest request) -
handleTypeMismatch
@ExceptionHandler(org.springframework.web.method.annotation.MethodArgumentTypeMismatchException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleTypeMismatch(org.springframework.web.method.annotation.MethodArgumentTypeMismatchException ex, jakarta.servlet.http.HttpServletRequest request) -
handleMissingParameter
@ExceptionHandler(org.springframework.web.bind.MissingServletRequestParameterException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleMissingParameter(org.springframework.web.bind.MissingServletRequestParameterException ex, jakarta.servlet.http.HttpServletRequest request) -
handleMaxUploadSizeExceeded
@ExceptionHandler(org.springframework.web.multipart.MaxUploadSizeExceededException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleMaxUploadSizeExceeded(org.springframework.web.multipart.MaxUploadSizeExceededException ex, jakarta.servlet.http.HttpServletRequest request) -
handleMethodNotSupported
@ExceptionHandler(org.springframework.web.HttpRequestMethodNotSupportedException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleMethodNotSupported(org.springframework.web.HttpRequestMethodNotSupportedException ex, jakarta.servlet.http.HttpServletRequest request) -
handleMediaTypeNotSupported
@ExceptionHandler(org.springframework.web.HttpMediaTypeNotSupportedException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleMediaTypeNotSupported(org.springframework.web.HttpMediaTypeNotSupportedException ex, jakarta.servlet.http.HttpServletRequest request) -
handleMediaTypeNotAcceptable
@ExceptionHandler(org.springframework.web.HttpMediaTypeNotAcceptableException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleMediaTypeNotAcceptable(org.springframework.web.HttpMediaTypeNotAcceptableException ex, jakarta.servlet.http.HttpServletRequest request) -
handleUnreadableMessage
@ExceptionHandler(org.springframework.http.converter.HttpMessageNotReadableException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleUnreadableMessage(org.springframework.http.converter.HttpMessageNotReadableException ex, jakarta.servlet.http.HttpServletRequest request) -
handleWritableException
@ExceptionHandler(org.springframework.http.converter.HttpMessageNotWritableException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleWritableException(org.springframework.http.converter.HttpMessageNotWritableException ex, jakarta.servlet.http.HttpServletRequest request) -
handleDataIntegrityViolation
@ExceptionHandler(org.springframework.dao.DataIntegrityViolationException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleDataIntegrityViolation(org.springframework.dao.DataIntegrityViolationException ex, jakarta.servlet.http.HttpServletRequest request) -
handleDomainException
@ExceptionHandler(DomainException.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleDomainException(DomainException ex, jakarta.servlet.http.HttpServletRequest request) -
handleGeneralException
@ExceptionHandler(java.lang.Exception.class) public org.springframework.http.ResponseEntity<org.springframework.http.ProblemDetail> handleGeneralException(Exception ex, jakarta.servlet.http.HttpServletRequest request)
-