handle connection error when server access denied.