Hello,
I had same problem and i resolve it using "onException tag" to intercept
validation error and return another http response code
Example DSL:
<camelContext ...>
<onException>
<exception>java.your.exception</exception>
<setHeader headerName="Exchange.HTTP_RESPONSE_CODE">
<constant>403</constant>
</setHeader>
<handled><constant>true</constant></handled>
</onException>
.....
....
</camelContext>
--
View this message in context:
http://camel.465427.n5.nabble.com/Customize-the-Http-Response-Code-for-REST-Service-tp5779682p5779691.html
Sent from the Camel - Users mailing list archive at Nabble.com.