Azure APIM Pseudo Gateway Timeout
End user wanted to simulate Gateway timeout, so that they can implement a retry step in their process. We have a DEV endpoint which I changed to below. This helps simulating the timeout.
<policies> <inbound> <base /> <return-response> <set-status code="504" reason="Gateway Timeout" /> <set-header name="Content-Type" exists-action="override"> <value>application/json</value> </set-header> <set-body>@{ return "{\"error\": \"Synthetic 504 for testing\"}"; }</set-body> </return-response> </inbound> <backend> <base /> </backend> <outbound> <base /> </outbound> <on-error> <base /> </on-error> </policies>