Hello, I have a route which has an onException block.
<setHeader headerName="DASResponse"> <simple>${exception.message}</simple> </setHeader> <log message="Exception before is ${exception}"/> <setProperty propertyName="Exchange.EXCEPTION_CAUGHT"> <constant>3000: Error code other than 50 sent by DAS</constant> </setProperty> <log message="Exception 1 is ${exception}"/> <setHeader headerName="Exchange.EXCEPTION_CAUGHT"> <simple>3000: Error code other than 50 sent by DAS</simple> </setHeader> <log message="Exception now is ${exception}"/> So ${exception.message} gives a proper DASResponse header. Then I need to create a custom exception to be handled by exception handler java classes. When I do setProperty, it makes exception as null. Is there a way we can set the value to a custom value? Vanshul