Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.
Here’s an outline with best practices for making your inquiry.
My question: For a request, I first got 500 Internal server error and if I hit the same request without changing anything, it shows 200 OK. What could be the reason?
To document the result.
Function Completes successfully, which is why it has a 200 response code.
At 3:50 (4:00 linux) Azure FunctionApp Load Balancer closes the connection which is why postman received a 500.
My resonse was ~ 4 min, which was why it worked sometimes.