I am using set status code policy in which i will be returning the status code and corresponding status reason for it , The reason is fetched during runtime and in developer portal if i try to hit the api i was able to receive the staus code with the expected reason message but if i call from by hosted service i am getting only the status code and i am not getting the related reason message
This does not exist in all APIM instances which I have it's in particular instance alone
I am getting the status reason if I try from developer portal
Note: The message variable in status reason is fetched from named values during run time
Code:
<when condition="@(!14==14))">
<return-response>
<set-status code="410" reason="@(context.Variables.GetValueOrDefault<string>("Message"))" />
<set-header name="Cache-Control" exists-action="override">
<value>max-age=0, no-cache, no-store, must-revalidate, proxy-revalidate</value>
</set-header>
</return-response>
</when>
Postman Call: Reason is not received only code ref:yellow highlighted box
Developer Console: Yellow Highlighted box shows both code and message