I’m trying to use the REST DSL and do validation on the incoming object with 
the Bean Validation Component.

I have configured my Spring XML like this:

  <setHeader headerName="Exchange.HTTP_RESPONSE_CODE">
    <simple>Validation error.\n\Message:\n${exception.message}</simple>

But when I use the Swagger UI to send a message to my endpoint, I get no body 
or HTTP response code. For other exceptions this approach works.

Should this work with this exception?

I’m using version 2.17.3

Kind regards,

Remco Schoen

Reply via email to