On Ubuntu 20.04, I was having issues with this as well, both getting unexpected EOF and unexpected 503, when trying to install VS Code with
snap install --classic code
The download simply wouldn’t start.
Instead of using the GUI to authenticate, I tried to run
sudo snap install --classic code
And it worked perfectly.
Please tell me I am crazy, because I feel like this really should not affect anything related to the network speed. I tried both a couple of times to verify, but perhaps it is still some kind of heisenbug.