treat ConnectionError and RuntimeError differently