MagicStack / MagicStack/asyncpg
connection error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.1k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
It is bit hard to figure out, which exceptions I should catch if I want to recover my application from connection errors.
So far
OSError- when database is downCannotConnectNowErrorwhen PostgreSQL is startingConnectionDoesNotExistErrorwhen connection is removed from connection poolInterfaceErrorwhen message contains one ofconnection has been released back to the poolthe underlying connection is closed
It seems I should add one PostgresConnectionError deriving classes as well? Anything else?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing exception definitions and the connection error paths described in the issue. Compare how OSError, CannotConnectNowError, ConnectionDoesNotExistError, and InterfaceError are raised, then determine whether a unified PostgresConnectionError hierarchy covers the listed recovery cases. Done means the desired exception API and its compatibility impact are agreed on.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- backend-api-design, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100