Better handle connection errors.