I've an http
service exposed in my Mule 3.3.0
flow. Now, I want to return different response on different exceptional conditions like want to differentiate if error is because of malformed xml versus incorrect input values or the error is on server side like jms is down. How can I best handle this in flow.
I tried creating private flow
which catches exception and applies transformer for the desired response. When the control comes back to the calling main flow, the returned exception of private flow is treated as payload message and continues with the rest of processing. The exception returned from private flow is not returned as response of http service
(as my flow is exposing http service)
Is there a way to stop the rest of flow if an exception has occurred in private flow?
I put xml verification in private flow because I want to differentiate error message thrown to user based on if its server or client error