handle errors for socket.connect