Greetings all,

I'm using the camel rest dsl in a karaf osgi blueprint to define my route (and 
I love it, so easy), and I've got an onException block properly handling my 
(known) exceptions for an 'application/json' POST endpoint.

I've set it to produce 'application/json' and when things go well it works fine.

However, on the exception case I want to respond with a json body containing 
the exception message.
e.g., { "error": "${exception.message}" }

When I use setBody to do the above, the response is a json string of the above 
instead of the above as json. (Does that make sense??)

So how can I set a json response body from a simple (dsl) string?

Cheers,
Gary

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to