Hi,

We are using Camel-2.8.3 and SMX -4.4.X. Our usecase flow is like below.

Client  -------> Camel-http client ----> Http Service

We were able to handle/ catch all the exceptions and observed that when HTTP
503 (service not available) error occurred control is going to custom
exception handler and returning custom xml message to client.

However client is receiving below response instead of custom error response.

STATUS: 503
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 503 Service Unavailable</title>
</head>
<body>
HTTP ERROR: 503

<p>Problem accessing /Transaction401/. Reason:
<pre>    Service Unavailable</pre></p>
<hr />/<small>Powered by Jetty://</small>/

Excpetion handling code:
                
   <onException>
                        <exception>java.lang.Exception</exception>
                        <handled>
                         <constant>true</constant>
                        </handled>
                        <setProperty propertyName="errorCode">
                         <simple>1006</simple>
                        </setProperty>
                        <setProperty propertyName="errorMessage">
                         <simple>${exception.message}</simple>
                        </setProperty>
                        <setProperty propertyName="xsltFileName">
                         <simple>error.xslt</simple>
                        </setProperty>
                        <setProperty propertyName="stackTrace">
                         <simple>${exception.stacktrace}</simple>
                        </setProperty>
                        <process ref="exceptionHandler" /> 
                   </onException>                                               
                               
Please suggest me why this scenario is not working.

Regards,
Pchakinala





--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-http-client-handling-503-error-tp5743847.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to