Mule flows:
<jersey:resources doc:name="REST">
<component class="com.test.qb.rest.MapIIFContent"/>
<jersey:exception-mapper class="com.test.qb.exception.IIFExceptionMapper" />
</jersey:resources>
<catch-exception-strategy doc:name="Audit Exception" >
<set-variable variableName="status" value="Failure" doc:name="Status"/>
<flow-ref name="QB:audit" doc:name="audit"/>
<http:response-builder status="500" contentType="application/json" doc:name="Status Code"/>
</catch-exception-strategy>
<logger message=" ===Reached here====" level="INFO" doc:name="Logger"/>
Java Rest Component:
Leisure component:
try{
String s =null;
s.toString();
} catch (IIFException e) {
return Response.status(500).entity(e.getMessage()).type("Application/json").build();
}
return Response.ok(res).build();
When I run this, it goes into the catch block in the Java Rest component with error status 500. But in Mule threads, I expect the thread to reach
'catch-exception-strategy doc: name = "Audit Exception">
but he doesnβt reach it, but reaches line 10. How can I handle this?
bekur source
share