github.com/lino-network/lino@v0.6.11/x/reputation/errors.go (about) 1 package reputation 2 3 import ( 4 "fmt" 5 6 sdk "github.com/cosmos/cosmos-sdk/types" 7 "github.com/lino-network/lino/types" 8 ) 9 10 // ErrAccountNotFound - error when account is not found 11 func ErrAccountNotFound(author types.AccountKey) sdk.Error { 12 return types.NewError(types.CodeAccountNotFound, fmt.Sprintf("account %v is not found", author)) 13 } 14 15 // ErrPostNotFound - error when post is not found 16 func ErrPostNotFound(permlink types.Permlink) sdk.Error { 17 return types.NewError(types.CodePostNotFound, fmt.Sprintf("post %v doesn't exist", permlink)) 18 } 19 20 // ErrQueryFailed - error when query reputation store failed 21 func ErrQueryFailed() sdk.Error { 22 return types.NewError(types.CodeReputationQueryFailed, fmt.Sprintf("query reputation store failed")) 23 }