-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
errors.go
23 lines (21 loc) · 1.43 KB
/
errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package authz
import "cosmossdk.io/errors"
// x/authz module sentinel errors
var (
// ErrNoAuthorizationFound error if there is no authorization found given a grant key
ErrNoAuthorizationFound = errors.Register(ModuleName, 2, "authorization not found")
// ErrInvalidExpirationTime error if the set expiration time is in the past
ErrInvalidExpirationTime = errors.Register(ModuleName, 3, "expiration time of authorization should be more than current time")
// ErrUnknownAuthorizationType error for unknown authorization type
ErrUnknownAuthorizationType = errors.Register(ModuleName, 4, "unknown authorization type")
// ErrNoGrantKeyFound error if the requested grant key does not exist
ErrNoGrantKeyFound = errors.Register(ModuleName, 5, "grant key not found")
// ErrAuthorizationExpired error if the authorization has expired
ErrAuthorizationExpired = errors.Register(ModuleName, 6, "authorization expired")
// ErrGranteeIsGranter error if the grantee and the granter are the same
ErrGranteeIsGranter = errors.Register(ModuleName, 7, "grantee and granter should be different")
// ErrAuthorizationNumOfSigners error if an authorization message does not have only one signer
ErrAuthorizationNumOfSigners = errors.Register(ModuleName, 9, "authorization can be given to msg with only one signer")
// ErrNegativeMaxTokens error if the max tokens is negative
ErrNegativeMaxTokens = errors.Register(ModuleName, 12, "max tokens should be positive")
)