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

Support more postgres errors #10

Open
1 task
Ramblurr opened this issue Aug 20, 2020 · 2 comments
Open
1 task

Support more postgres errors #10

Ramblurr opened this issue Aug 20, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@Ramblurr
Copy link
Contributor

To help track what postgres errors would be good to add default exception handlers for I've created this ticket.

All postgres errors are here: https://www.postgresql.org/docs/current/errcodes-appendix.html

  • 42703 | undefined_column - likely to encounter this when your model field name does not match the table column

... more soon ...

@kwrooijen kwrooijen added the enhancement New feature or request label Aug 20, 2020
@kwrooijen
Copy link
Owner

kwrooijen commented Aug 20, 2020

likely to encounter this when your model field name does not match the table column

You mean the field namespace doesn't match the model key?

Edit: Maybe we should have a validation check to see if all fields' namespaces are the same as the model keyword? Which would raise a readable exception at registration.

@Ramblurr
Copy link
Contributor Author

Ramblurr commented Aug 20, 2020

I mean when the model key e.g. "email" doesn't have a corresponding column "email" in the table.

In this case I added a field to my model but forgot to add it to the table in my migration.

Edit: and then the second time I encountered it was when I named a model key ":user/verified?" but the column name was only "verified" (missing the question mark).

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

No branches or pull requests

2 participants