Alright i think i found an easier solution other than restarting the pc or whatever
This should resolve anyone getting the "Code1" or "Code2" error messages
Open CMD as an admin.
And then paste these one by one and press enter (Ex: Paste the first line and press enter and so on)
netsh winsock reset
netsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns