Error handling when the connection fails. #6