We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
Maybe related to #2483.
When using @ExceptionHandler(ConstraintViolationException::class), all operations will get the 400 API response.
@ExceptionHandler(ConstraintViolationException::class)
400
To Reproduce Using the following:
implementation("org.springframework.boot", "spring-boot-starter-validation", "3.4.2") implementation("org.springdoc", "springdoc-openapi-starter-webmvc-ui", "2.8.5") implementation("org.springframework.boot", "spring-boot-starter-web", "3.4.2")
With this implementation:
@RestController class HelloController { @GetMapping("/hello") fun hello(): String { return "Hello, world!" } } @ControllerAdvice class HelloControllerAdvice { @ExceptionHandler(ConstraintViolationException::class) @ResponseStatus(HttpStatus.BAD_REQUEST) @ApiResponse(responseCode = "400", description = "Bad Request") fun constraintViolation( ex: ConstraintViolationException, ): String { TODO() } }
Expected behavior I would like to opt in to say that the operation actually could produce the exception.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Maybe related to #2483.
When using
@ExceptionHandler(ConstraintViolationException::class)
, all operations will get the400
API response.To Reproduce
Using the following:
With this implementation:
Expected behavior
I would like to opt in to say that the operation actually could produce the exception.
The text was updated successfully, but these errors were encountered: