Policy in Default Fault Rule Not Executing

We are using the Extension Callout policy in DefaultFaultRule for logging. In one proxy, the callout policy executes correctly. In another proxy, the callout policy does not execute at all. The error is for API key, none of the FaultRules are triggered which is expected.

The configurations are below. Screenshots show the trace for the proxy that works and one that does not call the Extension Callout policy.

Working:

<ProxyEndpoint name="default">

<Description/>

<FaultRules/>

<DefaultFaultRule name="logging_policy">

<Step>

<Name>EC-Fault</Name>

</Step>

<AlwaysEnforce>true</AlwaysEnforce>

</DefaultFaultRule>

-----------------------------------------------------------

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ConnectorCallout async="false" continueOnError="true" enabled="true" name="EC-Fault">

<DisplayName>EC-Fault</DisplayName>

<Connector>Stackdriver_POC</Connector>

<Action>log</Action>

<Input><![CDATA[

{

"logName": "log",

"metadata": {

"resource": {

"type": "global",

"labels": {

"project_id" : "xxxxx"

}

}

},

"message": {error.content}

}

]]></Input>

</ConnectorCallout>



8566-working-defaultfaultrule.png

Not Working:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ProxyEndpoint name="default">

<Description/>

<FaultRules>

<FaultRule name="invalid_card">

<Step>

<Name>EV_Pull_CardError</Name>

</Step>

<Step>

<Name>AM_ErrorMsg_AddCard</Name>

</Step>

<Condition>(servicecallout.SC_CC_postPaymentCardwithId.failed = true) or (servicecallout.SC_CC_postPaymentCardWithoutId.failed = true)</Condition>

</FaultRule>

<FaultRule name="card_not_found">

<Step>

<Name>EV_Pull_DeleteCardError</Name>

</Step>

<Step>

<Name>AM_setResponseStripe</Name>

</Step>

<Condition>(servicecallout.SC_CC_getCardDetails.failed = true) or (servicecallout.SC_CC_deleteStrCard.failed = true)</Condition>

</FaultRule>

</FaultRules>

<DefaultFaultRule name="logging_policy">

<Step>

<Name>EC-error-call</Name>

</Step>

<AlwaysEnforce>true</AlwaysEnforce>

</DefaultFaultRule>

-------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ConnectorCallout async="false" continueOnError="true" enabled="true" name="EC-error-call">

<DisplayName>EC-error-call</DisplayName>

<Connector>Stackdriver_POC</Connector>

<Action>log</Action>

<Input><![CDATA[

{

"logName": "log",

"metadata": {

"resource": {

"type": "global",

"labels": {

"project_id" : "xxxxxxx"

}

}

},

"message": {error.content}

}

]]></Input>

</ConnectorCallout>
<br />

8567-notworking-defaultfaultrule.png

0 3 365
3 REPLIES 3

I have logged a bug to the engineering team. Will keep this thread updated.

We figured out the cause. There was an empty DefaultFaultRule in the target endpoint for the proxy that was not working. After removing the empty DefaultFaultRule, the Extension Callout was executing properly.

Awesome! Thanks for updating