handle connection errors as Exception