0
votes

I have Azure Front Door (FD) set up in front of Azure API Management (APIM). Most requests are fine to this particular APIM backend. GET /projects is returning 502 Bad Gateway in the browser. I can see that the request from APIM to the backend is successful, project data is returned from the database. However, the FD logs show the error:

isReceivedFromClient_b: true
httpStatusCode_s: 502
httpStatusDetails_s: 502
pop_s: LON
cacheStatus_s: N/A
ErrorInfo_s: OriginInvalidResponse

From the documentation:

  • OriginInvalidResponse: Origin returned an invalid or unrecognized response.
  • Cache status of N/A: Request that was denied by Signed URL and Rules Set.

I've tried disabling the WAFPolicy. So, as far as I can see, there are no rules configured on this route. FrontdoorWebApplicationFirewallLog is enabled in Azure Diagnostics, but there are no entries at all in this log. It is here that I would have expected to see a log of the blocked request.

Any ideas on what's going on, or how I can debug this further?

1

1 Answers

0
votes

Let me just share one error I also had that may or may not be related to your situation. I had an error 502 Bad Gateway, in this case, was seen in a Microsoft Power Automate flow that was consuming an API published in API Manager. When API Manager was calling the backend system it had success with an HTTP 200 code.

The cause of the problems was due to the response JSON being defined as an Array but the JSON only add an item and therefore did not include the "[" and "]" symbols. Sorry if this does not help.