camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cedric de Launois (JIRA)" <>
Subject [jira] [Created] (CAMEL-4325) Wrong exception uri when an HTTP error code is returned
Date Wed, 10 Aug 2011 14:21:28 GMT
Wrong exception uri when an HTTP error code is returned

                 Key: CAMEL-4325
             Project: Camel
          Issue Type: Bug
          Components: camel-restlet
    Affects Versions: 2.8.0, 2.7.0, 2.6.0
            Reporter: Cedric de Launois

When a REST service returns an HTTP error code (e.g. 404), the URI property of the exception
is incorrect.
The URI is the URI of the origin endpoint of the route.
It should be instead the URI of the endpoint that threw the exception.

For instance, in the following route :
        <route id="restproxy">           
            <from uri="restlet:http://localhost:9080/oe/ws/offre/{id}"/>           
                <to uri="restlet:{id}"/>
                    <log message="URI=${exception.uri}"/>

The logged URI is "restlet:http://localhost:9080/oe/ws/offre/{id}" but should be instead the
real URI used, e.g. "restlet:".

This bug might be fixed by the following code change in class org.apache.camel.component.restlet.RestletProducer,
method populateRestletProducerException() :
   - String uri = exchange.getFromEndpoint().getEndpointUri();
   + String uri = response.getRequest().getResourceRef()

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message