Fault rule not getting triggered when backend is down

We have a default fault rule attached in the target endpoint. For all other errors like 401, 400 sent by the backend service, fault rule gets triggered. However when backend is down and 503 Service Unavailable happens, it's not picking up any fault rule (proxy or target).

Is there any solution to this or is this expected behavior?

0 5 227
5 REPLIES 5

Please show your TargetEndpoint configuration?

acharyadr_0-1644520660830.png

Here is the screenshot of the target endpoint config

 

I just tried this here in my Apigee X organization and my fault rule is firing. 

This is true in all of these cases:

  • the backend is UP and explicitly returns a 503.  
  • the backend domain does not resolve, and therefore Apigee cannot connect to it, hence internally assigns a 503
  • the backend domain name resolves, but is unreachable (simulates hard down), and Apigee sets a 503 status

I tried with and without AlwaysEnforce = true.

Are you sure  that the fault rule is not firing? 

Can you simplify the situation? Instead of calling a flow callout, call an AssignMessage policy that sets a single context variable? 

 

Yes. I tried using AssignMessage policy instead of Flow callout but same outcome. It's not triggering the fault rule at all. Below is the screenshot from the trace for reference. 

acharyadr_0-1644594674863.png

 

I suggest you contact Apigee support about this.