Not able to determine Fault Source in Apigee Edge

I am handling an error "413 Payload Too Large" and I am not able to determine the "fault-source" being Target, Policy, or Proxy. I currently use this setup, which works ok:

<Step>
<Condition>
(flow.error.code = null)
and (fault.name = "TooBigBody" and error.status.code = 413)</Condition>
<Name>AM-Error-413</Name>
</Step>

However, I would like to be able to add "fault-source" check to the condition and make sure the error is not from the Target Endpoint(502 TooBigBody). None of the variables provided here https://docs.apigee.com/api-platform/reference/variables-reference are able to provide me with the "fault-source". Is there any work around?

Solved Solved
0 1 167
1 ACCEPTED SOLUTION

You are looking for `error.state` which is described as "State in the Flow where an error occurred." Some example values of `error.state` would be: `PROXY_REQ_FLOW`, `PROXY_RESP_FLOW`,`TARGET_REQ_FLOW`, `TARGET_RESP_FLOW

For policy specific faults you should review https://docs.apigee.com/api-platform/reference/policies/error-code-reference

View solution in original post

1 REPLY 1

You are looking for `error.state` which is described as "State in the Flow where an error occurred." Some example values of `error.state` would be: `PROXY_REQ_FLOW`, `PROXY_RESP_FLOW`,`TARGET_REQ_FLOW`, `TARGET_RESP_FLOW

For policy specific faults you should review https://docs.apigee.com/api-platform/reference/policies/error-code-reference