No route to host

Then it is difficult to say anything.

“No route to host” and a 502 are very different errors however. You most likely have some routing issue on the network in question. You need to talk to the person responsible for that network.