$ curl -s -i -X POST localhost:8080/contact-record \ -H 'Content-Type: application/json' \ -d '{"email":"spammy@email.com","message":"This is spam."}' HTTP status: 400 Body: '' (empty!) # The record parameter has no BindingResult to collect field errors into, unlike # ContactController#submitContactForm's class-based, BindingResult-carrying signature. # A failing constraint throws MethodArgumentNotValidException instead, and Boot 4.1's # default handling for it returns an EMPTY body when the request has no Accept header # asking for a structured error. See the next transcript for what changes with one.