All,
I am using the option
throwExceptionOnFailure=false
to ensure I Camel doesn't throw exceptions for HTTP Status code 500 and
above (since I want to retry)
By default Camel throws HttpOperationFailedException for all HTTP responses
where status code is 400+
Pls see below for snippet from my Routes.xml
<route id="XXXXX" name="XXXXX" reform:systemName="AMP MarginCall
Dispute">
<from uri="jms:queue:queue.XXXXXXX"/>
<onException>
<exception>java.lang.Throwable</exception>
<process ref="errorHandle"/>
</onException>
<onCompletion>
<process ref="completeHandle"/>
</onCompletion>
<setHeader headerName="CamelHttpUri">
<simple>http://localhost:8181/SimpleServlet/simple-servlet?throwExceptionOnFailure=false</simple>
</setHeader>
<setHeader headerName="CamelHttpMethod">
<constant>PUT</constant>
</setHeader>
<setHeader headerName="Content-Type">
<constant>application/xml</constant>
</setHeader>
<setHeader headerName="Accept">
<constant>application/xml</constant>
</setHeader>
<to uri="http://www.google.com"/>
<setHeader headerName="JMSCorrelationID">
<simple>123456789</simple>
</setHeader>
<to uri="log:com.replies?level=WARN"/>
<to uri="jms:queue:queue.incomingReplies"/>
</route>
However i still see Camel throwing HttpOperationFailedException exception.
Can some one point out where I am going wrong.
regards.
--
View this message in context:
http://camel.465427.n5.nabble.com/How-to-use-throwExceptionOnFailure-false-to-differentiate-HTTP-Status-codes-tp5727591.html
Sent from the Camel - Users mailing list archive at Nabble.com.