We are seeing intermittent but recuring 502 Bad Gateway errors returned when using Logic Apps to convert documents to PDF. Microsoft Support have confirmed the Logic Apps end is working as expected and their internal logging is seeing the return code as a 500 error.
When the 500/502 errors occur the logic app is retrying 4 times (default) and timing out after approx. 7 minutes.
The same logic app run seconds later (with the same inputs i.e. same document to convert) will return a converted DPF document in approx. 10 seconds.