Skip to content

Conversation

@sigurjonviktorsson
Copy link
Contributor

I noticed that we throw exceptions from the requests library without checking if they can be retried.

Traceback (most recent call last):
  ...
 omitted non-relevant info here
  ...
  File "/usr/local/lib/python3.9/dist-packages/asana/page_iterator.py", line 58, in items
    for page in self:
  File "/usr/local/lib/python3.9/dist-packages/asana/page_iterator.py", line 40, in __next__
    result = self.get_initial()
  File "/usr/local/lib/python3.9/dist-packages/asana/page_iterator.py", line 69, in get_initial
    return self.client.get(self.path, self.query, **self.options)
  File "/usr/local/lib/python3.9/dist-packages/asana/client.py", line 171, in get
    return self.request('get', path, params=query, **options)
  File "/usr/local/lib/python3.9/dist-packages/asana/client.py", line 85, in request
    response = getattr(self.session, method)(
  File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/requests_oauthlib/oauth2_session.py", line 521, in request
    return super(OAuth2Session, self).request(
  File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='app.asana.com', port=443): Read timed out. (read timeout=5)

I noticed that we throw exceptions from the `requests` library without checking if they can be retried.
Copy link
Contributor

@jv-asana jv-asana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jv-asana jv-asana merged commit 704a19d into master Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants