I'm making request using policy.. I need to check the status code of that request
I tried using
<choose>
<when condition="@(((IResponse)context.Variables["LogFailedEvent"]).StatusCode != 200)">
</when>
</choose>
even
<choose>
<when condition="@(context.Response.StatusCode != 200)">
</when>
</choose>
but it throws error like key not present in dictionary
anyone have idea/solution?
If ignore-error attribute is set to "true" in your send-request policy, APIM will continue without setting response variable to anything. Trace your call using Test console in Azure portal to see where and why it breaks.