handled an exception when the client cannot establish a connection at all