-
Notifications
You must be signed in to change notification settings - Fork 692
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat : Removed SDK general error types (#2496)
* Feat : Removed SDK general error types * Changed unnecessary wrapf to wrap * made some required changes * changed version 10 to 11 * ran go mod tidy --------- Co-authored-by: Marius Poke <marius.poke@posteo.de>
- Loading branch information
Showing
6 changed files
with
174 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package errors | ||
|
||
import ( | ||
errorsmod "cosmossdk.io/errors" | ||
) | ||
|
||
const codespace = "gaia" | ||
|
||
var ( | ||
// ErrTxDecode is returned if we cannot parse a transaction | ||
ErrTxDecode = errorsmod.Register(codespace, 1, "tx parse error") | ||
// ErrUnauthorized is used whenever a request without sufficient | ||
// authorization is handled. | ||
ErrUnauthorized = errorsmod.Register(codespace, 2, "unauthorized") | ||
|
||
// ErrInsufficientFunds is used when the account cannot pay requested amount. | ||
ErrInsufficientFunds = errorsmod.Register(codespace, 3, "insufficient funds") | ||
|
||
// ErrInsufficientFunds is used when the account cannot pay requested amount. | ||
ErrInsufficientFee = errorsmod.Register(codespace, 4, "insufficient fee") | ||
|
||
// ErrInvalidCoins is used when sdk.Coins are invalid. | ||
ErrInvalidCoins = errorsmod.Register(codespace, 5, "invalid coins") | ||
|
||
// ErrInvalidType defines an error an invalid type. | ||
ErrInvalidType = errorsmod.Register(codespace, 6, "invalid type") | ||
|
||
// ErrLogic defines an internal logic error, e.g. an invariant or assertion | ||
// that is violated. It is a programmer error, not a user-facing error. | ||
ErrLogic = errorsmod.Register(codespace, 7, "internal logic error") | ||
|
||
// ErrNotFound defines an error when requested entity doesn't exist in the state. | ||
ErrNotFound = errorsmod.Register(codespace, 8, "not found") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.