added support for socks errors