camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Papke (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-12021) RequestBody with responseType throw a InvalidPayloadException instead of original exception
Date Tue, 21 Nov 2017 15:16:00 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-12021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Papke updated CAMEL-12021:
---------------------------------
    Description: 
I try to upgrade from camel 2.19.3 to camel 2.20.1 and the behavior of {{org.apache.camel.ProducerTemplate.requestBody(String,
Object, Class<T>)}} seems to be broken in case of exceptions.

>From the API the exception behavior is documented as "CamelExecutionException if the processing
of the exchange failed"
--> in camel 2.19 it works without any issues
--> since camel 2.20.1 the underlying exception is lost and instead a InvalidPayloadException
is thrown. 

A first analyze looks like the internal camel processing in 2.20 try to convert the exchange
in body to the given response type. But i don't think this is make sense in case of a exception.
Using the requestBody without the response type work correctly - here the unterlying exception
is correctly propagated back as a wrapped CamelExecutionException.

I was not able to find the root cause, so I could not provide a patch here - but I have attached
a junit test to reproduce the issue.

  was:
I try to upgrade from camel 2.19.3 to camel 2.20.1 and the behavior of {{org.apache.camel.ProducerTemplate.requestBody(String,
Object, Class<T>)}} seems to be broken in case of exceptions.

>From the API the exception behavior is documented as "CamelExecutionException if the processing
of the exchange failed"
--> in camel 2.19 it works without any issues
--> since camel 2.20.1 the underlying exception is lost and instead a InvalidPayloadException
is thrown. 

A first analyze looks like the internal camel processing in 2.20 try to convert the exchange
in body to the given response type. But i don't think this is make sense in case of a exception.


I was not able to find the root cause, so I could not provide a patch here - but I have attached
a junit test to reproduce the issue.


> RequestBody with responseType throw a InvalidPayloadException instead of original exception
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-12021
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12021
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.20.1
>            Reporter: Thomas Papke
>         Attachments: camel-issue.patch
>
>
> I try to upgrade from camel 2.19.3 to camel 2.20.1 and the behavior of {{org.apache.camel.ProducerTemplate.requestBody(String,
Object, Class<T>)}} seems to be broken in case of exceptions.
> From the API the exception behavior is documented as "CamelExecutionException if the
processing of the exchange failed"
> --> in camel 2.19 it works without any issues
> --> since camel 2.20.1 the underlying exception is lost and instead a InvalidPayloadException
is thrown. 
> A first analyze looks like the internal camel processing in 2.20 try to convert the exchange
in body to the given response type. But i don't think this is make sense in case of a exception.
Using the requestBody without the response type work correctly - here the unterlying exception
is correctly propagated back as a wrapped CamelExecutionException.
> I was not able to find the root cause, so I could not provide a patch here - but I have
attached a junit test to reproduce the issue.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message