How to catch SQL errors with AsyncPG? #819
Unanswered
fugacityengr
asked this question in
Q&A
Replies: 1 comment
-
Asyncpg maps all PostgreSQL server errors one-to-one, you can see the mapping in the source. There are also several client-specific errors here I need to see how to generate the documentation properly from the reflection. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to figure out how to handle SQL errors with asyncpg. Like if a record does not exist, etc.
I came across this StackOverflow question with the same problem but nobody has answered yet.
Does asyncpg have postgresql errors mapped to classes? Similar to what psycopg2 offers? Exception classes mapping PostgreSQL errors
If there is none, how should I go about handling SQL database errors?
Anyone that could help me with my question?
Beta Was this translation helpful? Give feedback.
All reactions