graphile / graphile/graphile.github.io
Add documentation about reporting error codes from within PostgreSQL
- Dominant language
- SCSS
- Stars
- 27
- Forks
- 126
- PR merge metrics
- No merged PRs in 30d
Description
Here's what I use on some projects (most error codes have been omitted because they won't make sense for your app):
---
Error codes
===========
Errors from PostGraphile may come through with one of these error codes.
Error code rules
----------------
Some error codes are [reserved by
PostgreSQL](https://www.postgresql.org/docs/9.6/static/errcodes-appendix.html),
so error codes we use must match these criterea:
- 5 alphanumeric (capitals) letters
- First character must be a letter
- First character cannot be F, H, P or X.
- Third character cannot be 0 or P.
- Fourth character must be a letter.
- Must not end `000`
Rewritten, the above rules state:
- Char 1: A-Z except F, H, P, X
- Char 2: A-Z0-9
- Char 3: A-Z0-9 except 0, P
- Char 4: A-Z
- Char 5: A-Z0-9
Common
------
- SELF0: you can't do that to yourself (e.g. remove admin from yourself)
- ERROR: invalid arguments
- UNSUB: error unsubscribing - perhaps your token was wrong?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.