Closed as not planned
Closed as not planned
Description
Affects: 6.0.3
After migrating to Boot 3 in my Boot application that has a @ControllerAdvice
extending ResponseEntityExceptionHandler
, my application started retrieving Errors using the ProblemDetail
spec, overriding Boot's Error Handling mechanism.
All good up to that point, but my input validations are not retrieving the validation messages anywhere.
For example, I might have this constraint in my DTO:
@NotNull(message = "a custom validation error")
Long foo,
But the response for a request sending a null
value for this field looks as follows:
{
"type": "about:blank",
"title": "Bad Request",
"status": 400,
"detail": "Invalid request content.",
"instance": "/bar"
}
Shouldn't the detail
contain the validation message, or, since there can be a number of binding errors, be included as an ProblemDetail.properties
entry, resulting in an extra response body field?