Unable to install snaps "connection reset by peer"

Hello, I just followed all the instructions in here to install snap in debian: https://snapcraft.io/docs/installing-snap-on-debian

But I keep receiving this error when trying to install any snap:

proverx@proverx:~$ sudo snap install core 
error: cannot install "core": Post https://api.snapcraft.io/v2/snaps/refresh: read
tcp> read: connection reset by peer

Is there any solution for this? I have been looking in old forums but I can’t find anything.