{"modulePath":"github.com/ignite/modules","version":"v0.0.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package errors\n\nPackage errors defines methods to handle specific error in cosmos blockchain like critical errors\n\nPackage errors aliases both the \\`cosmos-sdk/types/errors.go\\` and \\`cosmossdk.io/errors\\` packages to give access to cosmos-sdk error definitions and functions with a single import path.\n\n## Constants\n\n```go\nconst Codespace = \"ignite\"\n```\nCodespace is the codespace for all errors defined in this package\n\n## Variables\n\n```go\nvar (\n\tSuccessABCICode    = sdkerrors.SuccessABCICode\n\tABCIInfo           = sdkerrors.ABCIInfo\n\tUndefinedCodespace = sdkerrors.UndefinedCodespace\n\tRegister           = sdkerrors.Register\n\tABCIError          = sdkerrors.ABCIError\n\tNew                = sdkerrors.New\n\tWrap               = sdkerrors.Wrap\n\tWrapf              = sdkerrors.Wrapf\n\tRecover            = sdkerrors.Recover\n\tWithType           = sdkerrors.WithType\n\tIsOf               = sdkerrors.IsOf\n\tAssertNil          = sdkerrors.AssertNil\n)\n```\nType Aliases to sdk errors module\n\n```go\nvar (\n\t// ErrTxDecode is returned if we cannot parse a transaction\n\tErrTxDecode = Register(Codespace, 2, \"tx parse error\")\n\n\t// ErrInvalidSequence is used the sequence number (nonce) is incorrect\n\t// for the signature\n\tErrInvalidSequence = Register(Codespace, 3, \"invalid sequence\")\n\n\t// ErrUnauthorized is used whenever a request without sufficient\n\t// authorization is handled.\n\tErrUnauthorized = Register(Codespace, 4, \"unauthorized\")\n\n\t// ErrInsufficientFunds is used when the account cannot pay requested amount.\n\tErrInsufficientFunds = Register(Codespace, 5, \"insufficient funds\")\n\n\t// ErrUnknownRequest to doc\n\tErrUnknownRequest = Register(Codespace, 6, \"unknown request\")\n\n\t// ErrInvalidAddress to doc\n\tErrInvalidAddress = Register(Codespace, 7, \"invalid address\")\n\n\t// ErrInvalidPubKey to doc\n\tErrInvalidPubKey = Register(Codespace, 8, \"invalid pubkey\")\n\n\t// ErrUnknownAddress to doc\n\tErrUnknownAddress = Register(Codespace, 9, \"unknown address\")\n\n\t// ErrInvalidCoins to doc\n\tErrInvalidCoins = Register(Codespace, 10, \"invalid coins\")\n\n\t// ErrOutOfGas to doc\n\tErrOutOfGas = Register(Codespace, 11, \"out of gas\")\n\n\t// ErrMemoTooLarge to doc\n\tErrMemoTooLarge = Register(Codespace, 12, \"memo too large\")\n\n\t// ErrInsufficientFee to doc\n\tErrInsufficientFee = Register(Codespace, 13, \"insufficient fee\")\n\n\t// ErrTooManySignatures to doc\n\tErrTooManySignatures = Register(Codespace, 14, \"maximum number of signatures exceeded\")\n\n\t// ErrNoSignatures to doc\n\tErrNoSignatures = Register(Codespace, 15, \"no signatures supplied\")\n\n\t// ErrJSONMarshal defines an ABCI typed JSON marshalling error\n\tErrJSONMarshal = Register(Codespace, 16, \"failed to marshal JSON bytes\")\n\n\t// ErrJSONUnmarshal defines an ABCI typed JSON unmarshalling error\n\tErrJSONUnmarshal = Register(Codespace, 17, \"failed to unmarshal JSON bytes\")\n\n\t// ErrInvalidRequest defines an ABCI typed error where the request contains\n\t// invalid data.\n\tErrInvalidRequest = Register(Codespace, 18, \"invalid request\")\n\n\t// ErrTxInMempoolCache defines an ABCI typed error where a tx already exists\n\t// in the mempool.\n\tErrTxInMempoolCache = Register(Codespace, 19, \"tx already in mempool\")\n\n\t// ErrMempoolIsFull defines an ABCI typed error where the mempool is full.\n\tErrMempoolIsFull = Register(Codespace, 20, \"mempool is full\")\n\n\t// ErrTxTooLarge defines an ABCI typed error where tx is too large.\n\tErrTxTooLarge = Register(Codespace, 21, \"tx too large\")\n\n\t// ErrKeyNotFound defines an error when the key doesn't exist\n\tErrKeyNotFound = Register(Codespace, 22, \"key not found\")\n\n\t// ErrWrongPassword defines an error when the key password is invalid.\n\tErrWrongPassword = Register(Codespace, 23, \"invalid account password\")\n\n\t// ErrorInvalidSigner defines an error when the tx intended signer does not match the given signer.\n\tErrorInvalidSigner = Register(Codespace, 24, \"tx intended signer does not match the given signer\")\n\n\t// ErrorInvalidGasAdjustment defines an error for an invalid gas adjustment\n\tErrorInvalidGasAdjustment = Register(Codespace, 25, \"invalid gas adjustment\")\n\n\t// ErrInvalidHeight defines an error for an invalid height\n\tErrInvalidHeight = Register(Codespace, 26, \"invalid height\")\n\n\t// ErrInvalidVersion defines a general error for an invalid version\n\tErrInvalidVersion = Register(Codespace, 27, \"invalid version\")\n\n\t// ErrInvalidChainID defines an error when the chain-id is invalid.\n\tErrInvalidChainID = Register(Codespace, 28, \"invalid chain-id\")\n\n\t// ErrInvalidType defines an error an invalid type.\n\tErrInvalidType = Register(Codespace, 29, \"invalid type\")\n\n\t// ErrTxTimeoutHeight defines an error for when a tx is rejected out due to an\n\t// explicitly set timeout height.\n\tErrTxTimeoutHeight = Register(Codespace, 30, \"tx timeout height\")\n\n\t// ErrUnknownExtensionOptions defines an error for unknown extension options.\n\tErrUnknownExtensionOptions = Register(Codespace, 31, \"unknown extension options\")\n\n\t// ErrWrongSequence defines an error where the account sequence defined in\n\t// the signer info doesn't match the account's actual sequence number.\n\tErrWrongSequence = Register(Codespace, 32, \"incorrect account sequence\")\n\n\t// ErrPackAny defines an error when packing a protobuf message to Any fails.\n\tErrPackAny = Register(Codespace, 33, \"failed packing protobuf message to Any\")\n\n\t// ErrUnpackAny defines an error when unpacking a protobuf message from Any fails.\n\tErrUnpackAny = Register(Codespace, 34, \"failed unpacking protobuf message from Any\")\n\n\t// ErrLogic defines an internal logic error, e.g. an invariant or assertion\n\t// that is violated. It is a programmer error, not a user-facing error.\n\tErrLogic = Register(Codespace, 35, \"internal logic error\")\n\n\t// ErrConflict defines a conflict error, e.g. when two goroutines try to access\n\t// the same resource and one of them fails.\n\tErrConflict = Register(Codespace, 36, \"conflict\")\n\n\t// ErrNotSupported is returned when we call a branch of a code which is currently not\n\t// supported.\n\tErrNotSupported = Register(Codespace, 37, \"feature not supported\")\n\n\t// ErrNotFound defines an error when requested entity doesn't exist in the state.\n\tErrNotFound = Register(Codespace, 38, \"not found\")\n\n\t// ErrIO should be used to wrap internal errors caused by external operation.\n\t// Examples: not DB domain error, file writing etc...\n\tErrIO = Register(Codespace, 39, \"Internal IO error\")\n\n\t// ErrAppConfig defines an error occurred if min-gas-prices field in BaseConfig is empty.\n\tErrAppConfig = Register(Codespace, 40, \"error in app.toml\")\n\n\t// ErrInvalidGasLimit defines an error when an invalid GasWanted value is\n\t// supplied.\n\tErrInvalidGasLimit = Register(Codespace, 41, \"invalid gas limit\")\n\n\t// ErrPanic is only set when we recover from a panic, so we know to\n\t// redact potentially sensitive system info\n\tErrPanic = sdkerrors.ErrPanic\n)\n```\n\n```go\nvar ErrCritical = Register(codespace, 2, \"the state of the blockchain is inconsistent or an invariant is broken\")\n```\n\n## Functions\n\n```go\nfunc Critical(description string) error\n```\nCritical handles and/or returns an error in case a critical error has been encountered: - Inconsistent state - Broken invariant\n\n```go\nfunc Criticalf(format string, args ...interface{}) error\n```\nCriticalf extends a critical error with additional information.\n\nThis function works like the Critical function with additional functionality of formatting the input as specified.\n\n## Types\n\n```go\ntype Error = sdkerrors.Error\n```\nError type alias for errorsmod.Error\n\n","path":"github.com/ignite/modules/pkg/errors","name":"errors","synopsis":"Package errors defines methods to handle specific error in cosmos blockchain like critical errors","isRedistributable":true}
