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:

(flow.error.code = null) and (fault.name = "TooBigBody" and error.status.code = 413) AM-Error-413

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?

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

1 Like