Attach fault rules to the following entities in an API proxy configuration: ProxyEndpoint: Enables fault handling for all errors that occur in the ProxyEndpoint request and response flows. TargetEndpoint: Enables fault handling for all errors that occur in the TargetEndpoint request and response flows.It doesn't talk about attaching same to policies. Policy individual pages also doesn't talk about same explicitly. Check right side bar for tags in below example. But, Some of the examples in policy pages use same for example here,
<LookupCache async="false" continueOnError="false" enabled="true" name="Lookup-Cache-1"> <DisplayName>Lookup Cache 1</DisplayName> <FaultRules/> <Properties/> <CacheKey> <Prefix/> <KeyFragment ref=""/> </CacheKey> <!-- Omit this element if you're using the included shared cache. --> <CacheResource/> <Scope>Exclusive</Scope> <AssignTo>flowVar</AssignTo> </LookupCache>Is it a doc issue or fault rules are not supported on policies ? Cheers, Anil Sagar
Solved! Go to Solution.
How about the FaultRules in each Step?
As per document I see FaultRules tag can be attached at the Step level. if a <FaultRules/> tag is present in the step, Apigee does not mind saving.
Good Example:
<Step> <FaultRules/> <Name>RaiseFault_fault500</Name> <Condition>(request.queryparam.fault500 == "true")</Condition> </Step>
However, the following gives an error
<Step> <FaultRules> <FaultRule name="default"> <Step> <Name>set400error</Name> </Step> <Condition>error.status.code == 500</Condition> </FaultRule> </FaultRules> <Name>RaiseFault_fault500</Name> <Condition>(request.queryparam.fault500 == "true")</Condition> </Step>
Please confirm if my understanding is correct?
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |