camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: REST DSL Exception Handling
Date Fri, 12 Dec 2014 10:58:28 GMT
Hi

Where does this exception happen?

You can try setting consumer.bridgeErrorHandler=true
http://camel.apache.org/why-does-my-file-consumer-not-pick-up-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.html

You would need to set this with rest-dsl as a consumer property
http://camel.apache.org/rest-dsl

restConfiguration().component("jetty").port(9091).consumerProperty("bridgeErrorHandler",
"true");

On Thu, Dec 11, 2014 at 10:19 PM, restful camel <binyrj@gmail.com> wrote:
> Hi,
>
> Newbie to Camel. I want to handle a specific exception (JsonParseException)
> which is thrown when the Rest webservice configured in the camelContext
> (Spring DSL) is invoked. Right now, the JsonParseException is being caught
> by the Camel Context Error handler - however, I want to be able to write a
> specific onException block that will handle this exception and send back
> appropriate response to the user. How can I achieve this? I tried writing an
> onException block in the camelContext to handle this, but apparently the
> thrown exception is not being handled within that block.
>
> Thanks!
> Restful Camel :)
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/REST-DSL-Exception-Handling-tp5760600.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message