# Raise Fault During Java Callout

**URL:** <https://discuss.google.dev/t/raise-fault-during-java-callout/14109>\
**Category:** Apigee\
**Tags:** apigee-general\
**Created:** [November 18, 2016, 3:18am UTC](https://discuss.google.dev/t/raise-fault-during-java-callout/14109 "2016-11-18T03:18:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [November 18, 2016, 3:18am UTC](https://discuss.google.dev/t/raise-fault-during-java-callout/14109/1 "2016-11-18T03:18:34Z")

</div>

Hi All,

Condition **javacallout.\<**  **JavaCallout Policy Name\>.failed=true is not working when Java Callout policy is failing to raise fault.**

**Please find the snap of code**

**XXX\_RaiseFault\_JavaCalloutError**

\*\*\*\ ***javacallout.\<**  **JavaCallout Policy Name\>.failed=true**

**Could any one help on this.**

**Thanks n Regards,**

**Manish**

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [November 18, 2016, 6:43am UTC](https://discuss.google.dev/t/raise-fault-during-java-callout/14109/2 "2016-11-18T06:43:29Z")

</div>

Hi Manish,  
I am not sure about this condition check.  
But there is one other way to handle this.  
You can set some check variable in java code as below:  
MessageContext\*\*.setVariable(“result”, result);\*\*

And then in following policies you can use this variable for verification.
