New error codes. (#1019)

* new error codes

* Add general system errors to API interceptor

Co-authored-by: Louis Ruch <louisruch@gmail.com>
This commit is contained in:
JimandLouis Ruch authored and GitHub committed 2021-03-20 06:52:47 -04:00
1 parent 6b2d6b6462
commit b39dff8140
5 files changed
+53 -2

No files matched your search

+4
View File
@@ -58,6 +58,10 @@ const (
GenKey Code = 304 // GenKey represents an error occurred during the underlying key generation process
GenCert Code = 305 // GenCert represents an error occurred during the underlying certificate generation process
// General system errors are reserved Codes 400-599 and align with http client and server error codes
Forbidden Code = 403 // Forbidden represents the operation is forbidden
Internal Code = 500 // InternalError represents the system encountered an unexpected condition.
// DB errors are reserved Codes from 1000-1999
CheckConstraint Code = 1000 // CheckConstraint represents a check constraint error
NotNull Code = 1001 // NotNull represents a value must not be null error