Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninformative RequestException message when original exception is asyncio.TimeoutError #86

Open
oussama-gourari opened this issue Nov 26, 2024 · 0 comments

Comments

@oussama-gourari
Copy link

oussama-gourari commented Nov 26, 2024

Describe the solution you'd like

If an asyncio.TimeoutError occurs, an asyncprawcore.exceptions.RequestException will be raised with an exception message that is uninformative:

  File "C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\asyncprawcore\sessions.py", line 383, in request
    return await self._request_with_retries(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
    )
    ^
  File "C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\asyncprawcore\sessions.py", line 286, in _request_with_retries
    response, saved_exception = await self._make_request(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\asyncprawcore\sessions.py", line 192, in _make_request
    response = await self._rate_limiter.call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<9 lines>...
    )
    ^
  File "C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\asyncprawcore\rate_limit.py", line 51, in call
    response = await request_function(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Utilisateur\AppData\Local\Programs\Python\Python313\Lib\site-packages\asyncprawcore\requestor.py", line 80, in request
    raise RequestException(exc, args, kwargs) from None
asyncprawcore.exceptions.RequestException: error with request 

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant