502 Bad Gateway error on Discord means that you simply won't be able to access discord and is due to one of the servers you are connected to. As it is a server-based error, you can do nothing but wait for the Discord team to solve it. Usually, the Discord team is very speedy in this and should be resolved soon.