question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AiohttpClient requests raise built-in ConnectionError

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
JakeUrbancommented, Mar 4, 2021

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.

0reactions
overcatcommented, Mar 5, 2021

Thanks.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found