Skip to content
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

How best to handle errors that come from database constraints? #57

Closed
mfelix5 opened this issue Dec 24, 2020 · 1 comment
Closed

How best to handle errors that come from database constraints? #57

mfelix5 opened this issue Dec 24, 2020 · 1 comment
Assignees
Labels

Comments

@mfelix5
Copy link

mfelix5 commented Dec 24, 2020

Using the starter, if you have a service function do something that violates a database constraint (for example on uniqueness or table relationships), the error is uncaught and the API returns a 500. What is a good strategy for catching these errors and returning a 4xx and a better error message?

@ljlm0402
Copy link
Owner

@mfelix5

Thanks for the good comment.
Let's think of a better way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants