feat(error): add PermissionDenied error code
- Add error code 40008 for permission denied scenarios - Add corresponding error message for admin permission checks
This commit is contained in:
parent
2fd22c97e0
commit
0f6fddc36d
@ -50,6 +50,7 @@ const (
|
|||||||
InvalidAccess uint32 = 40005
|
InvalidAccess uint32 = 40005
|
||||||
InvalidCiphertext uint32 = 40006
|
InvalidCiphertext uint32 = 40006
|
||||||
SecretIsEmpty uint32 = 40007
|
SecretIsEmpty uint32 = 40007
|
||||||
|
PermissionDenied uint32 = 40008
|
||||||
)
|
)
|
||||||
|
|
||||||
//coupon error
|
//coupon error
|
||||||
|
|||||||
@ -17,6 +17,7 @@ func init() {
|
|||||||
SecretIsEmpty: "Secret is empty",
|
SecretIsEmpty: "Secret is empty",
|
||||||
InvalidAccess: "Invalid access",
|
InvalidAccess: "Invalid access",
|
||||||
InvalidCiphertext: "Invalid ciphertext",
|
InvalidCiphertext: "Invalid ciphertext",
|
||||||
|
PermissionDenied: "Permission denied",
|
||||||
// Database error
|
// Database error
|
||||||
DatabaseQueryError: "Database query error",
|
DatabaseQueryError: "Database query error",
|
||||||
DatabaseUpdateError: "Database update error",
|
DatabaseUpdateError: "Database update error",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user