kennethreitz/requests — Issue #314: Exceptions inside greenlets
Author: j4mie
Created: 2011-12-20 10:59:48+00:00
State: open

Hi,

When using the async stuff, how do I correctly handle an exception that occurs inside the greenlet?

Traceback (most recent call last):
File "/Users/jamie/.virtualenvs/pulse/lib/python2.7/site-packages/gevent/greenlet.py", line 390, in run
result = self._run(*self.args, **self.kwargs)
File "/Users/jamie/.virtualenvs/pulse/lib/python2.7/site-packages/requests/async.py", line 50, in send
r.send()
File "/Users/jamie/.virtualenvs/pulse/lib/python2.7/site-packages/requests/models.py", line 454, in send
raise ConnectionError(e)
ConnectionError: Max retries exceeded for url: /followers/ids.json?user_id=21762493
)> failed with ConnectionError