AiohttpClient requests raise built-in ConnectionError
See original GitHub issueDescribe the bug
The AiohttpClient
class raises the builtin python ConnectionError
exception instead of stellar_sdk.exceptions.ConnectionError
. The docstring suggests the SDK exception is raised.
What version of dependencies are you using? SDK v2.11
To Reproduce N/A
Expected behavior
AiohttpClient
should raise stellar_sdk.exceptions.ConnectionError
to be consistent with other SDK clients
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Python requests - Exception Type: ConnectionError - try
Neither str nor repr gives any indication that the class isn't the built-in one. It doesn't even inherit from the built-in ConnectionError, it ......
Read more >requests.exceptions — Requests 2.28.1 documentation
Catching this error will catch both :exc:`~requests.exceptions. ... [docs]class ConnectTimeout(ConnectionError, Timeout): """The request timed out while ...
Read more >How to use the aiohttp.ClientError function in aiohttp - Snyk
ClientError as e: raise Exception(f"aiohttp client throws an error: {e.__class__.__name__}: {e}") elif method == "DeleteWebhook":.
Read more >Web Server Exceptions — aiohttp 4.0.0a2.dev0 documentation
HTTP exceptions for status code in range 200-299. They are not errors but special classes reflected in exceptions hierarchy. E.g. raise web.HTTPNoContent may ......
Read more >8. Errors and Exceptions — Python 3.11.1 documentation
The builtin ExceptionGroup wraps a list of exception instances so that they can be raised together. It is an exception itself, so it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Polaris uses the synchronous client in most situations, but uses the async client to stream payments to the anchor’s distribution accounts concurrently.
I’m considering using it more, but asynchronous code is difficult to test when running Python 3.7, since asynchronous support was not added to common testing libraries until 3.8. I’ll likely wait until Polaris 2.0 to upgrade the Python version, and may introduce the additional async support then.
Thanks.