-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
feat(errors): add unique constraint violation error #1069
Conversation
43b8fc4
to
820d2a4
Compare
4af3237
to
388c97d
Compare
740bab5
to
834a3d3
Compare
e75833a
to
ff8cab7
Compare
88d80e1
to
17f1865
Compare
17f1865
to
5717774
Compare
03fd587
to
34e21d9
Compare
@steebchen is this OK to be merged? would help a lot with error handling |
@nettrino Actually it would be great if you could try it using
and re-generate the client. This PR includes some tests but it would be great for someone to actually use it and check if everything looks good. Thanks! Feel free to ping me in discord as well. |
Tested on Postgres (Neon DB) tonight and it works fine for me. Unique constraints on both BigInt & String types work as expected. Thanks for this! |
@steebchen Has also been running fine for me for a week or so, so this should be good to merge! |
Awesome thanks! One thing which @abelanger5 mentioned is that it would be nice if |
Adds helper functions for one of the most commonly used errors, a unique constraint violation.
Note that different databases return slightly different metadata, which means the implementation details depend on what database you use:
fix #213