question

NiharikaKoneru-8312 avatar image
0 Votes"
NiharikaKoneru-8312 asked ChaitanyaNaykodiMSFT-9638 answered

Why is my Function getting a bad gateway error 502 response when using HttpRequestMessage.CreateResponse(…, JArray)?

My Function App was working a few days ago and then suddenly it started throwing a bad gateway error. What would cause this to happen and how can I fix it?

azure-functions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ChaitanyaNaykodiMSFT-9638 avatar image
1 Vote"
ChaitanyaNaykodiMSFT-9638 answered

Hello @NiharikaKoneru-8312,

Function Apps upgraded to V3 may have this issue. To mitigate, your function app can be pinned to another host version from your Configuration Application Settings.
Documentation on Pinning Function App to V2


This issue can be tracked here.


The recommendation is to use jArray.ToString() as the parameter instead.
This is because for the function to work we need to allow synchronous IO.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.