-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
errors.go
25 lines (23 loc) · 1.49 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
24
25
package authz
import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
// x/authz module sentinel errors
var (
// ErrNoAuthorizationFound error if there is no authorization found given a grant key
ErrNoAuthorizationFound = sdkerrors.Register(ModuleName, 2, "authorization not found")
// ErrInvalidExpirationTime error if the set expiration time is in the past
ErrInvalidExpirationTime = sdkerrors.Register(ModuleName, 3, "expiration time of authorization should be more than current time")
// ErrUnknownAuthorizationType error for unknown authorization type
ErrUnknownAuthorizationType = sdkerrors.Register(ModuleName, 4, "unknown authorization type")
// ErrNoGrantKeyFound error if the requested grant key does not exist
ErrNoGrantKeyFound = sdkerrors.Register(ModuleName, 5, "grant key not found")
// ErrAuthorizationExpired error if the authorization has expired
ErrAuthorizationExpired = sdkerrors.Register(ModuleName, 6, "authorization expired")
// ErrGranteeIsGranter error if the grantee and the granter are the same
ErrGranteeIsGranter = sdkerrors.Register(ModuleName, 7, "grantee and granter should be different")
// ErrAuthorizationNumOfSigners error if an authorization message does not have only one signer
ErrAuthorizationNumOfSigners = sdkerrors.Register(ModuleName, 9, "authorization can be given to msg with only one signer")
// ErrNegativeMaxTokens error if the max tokens is negative
ErrNegativeMaxTokens = sdkerrors.Register(ModuleName, 12, "max tokens should be positive")
)