Hello there,
Have you tried cheking the Logs ? To investigate this a bit further enable Failed Request Tracing on the IIS server.
Failed Request Tracing Rules is a powerful tool for troubleshooting request-processing failures in IIS 7.0 and above.
Using Failed Request Tracing Rules to Troubleshoot Application Request Routing https://learn.microsoft.com/en-us/iis/troubleshoot/using-failed-request-tracing/using-failed-request-tracing-rules-to-troubleshoot-application-request-routing-arr
Troubleshooting 502 Errors in ARR https://learn.microsoft.com/en-us/iis/extensions/troubleshooting-application-request-routing/troubleshooting-502-errors-in-arr
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer–