status_codes

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidParams       = 1001
	IncorrectAddress    = 100101
	DomainMissing       = 100102
	OwnerAddressMissing = 100103
	OnSaleFlagNotSet    = 100104

	IOError        = 1002
	IOErrorNodeKey = 100201

	ParseError        = 1003
	ParseErrorAddress = 100301

	ConfigurationError          = 1004
	ConfigurationErrorChainType = 100401

	ResourceNotFoundError = 1005
	AccountNotFound       = 100501
	DomainNotFound        = 100502

	InternalError                  = 1006
	InternalErrorSerialization     = 100601
	InternalErrorSigning           = 100602
	InternalErrorGeneratingKeyPair = 100603
	InternalErrorGettingBalance    = 100604
	InternalErrorListValidators    = 100605

	WalletError               = 2006
	WalletErrorAddingAccount  = 200601
	WalletErrorGettingAccount = 200602
	WalletErrorDeleteAccount  = 200603

	AccountsError                     = 2007
	AccountsErrorGeneratingNewAccount = 200701

	// Transaction statuses
	TxErrMisingData         = 300101
	TxErrUnserializable     = 300102
	TxErrWrongTxType        = 300103
	TxErrInvalidAmount      = 300104
	TxErrInvalidPubKey      = 300105
	TxErrUnmatchedSigner    = 300106
	TxErrInvalidSignature   = 300107
	TxErrInvalidFeeCurrency = 300108
	TxErrInvalidFeePrice    = 300109
	TxErrInsufficientFunds  = 300110
	TxErrGasOverflow        = 300111
)

Variables

View Source
var (
	ErrSerialization = ProtocolError{InternalErrorSerialization, "error in serialization"}

	ErrLoadingNodeKey = ProtocolError{IOErrorNodeKey, "error reading node key file"}
	ErrParsingAddress = ProtocolError{ParseErrorAddress, "error parsing address"}
	ErrChainType      = ProtocolError{ConfigurationErrorChainType, "error getting chain type"}

	ErrAddingAccount   = ProtocolError{WalletErrorAddingAccount, "error adding account to wallet"}
	ErrGettingAccount  = ProtocolError{WalletErrorGettingAccount, "error getting account from wallet"}
	ErrDeletingAccount = ProtocolError{WalletErrorDeleteAccount, "error in deleting account"}

	ErrGeneratingAccount = ProtocolError{AccountsErrorGeneratingNewAccount, "error generating new account"}
	ErrAccountNotFound   = ProtocolError{AccountNotFound, "account doesn't in wallet"}
	ErrSigningError      = ProtocolError{InternalErrorSigning, "error while signing"}
	ErrKeyGeneration     = ProtocolError{InternalErrorGeneratingKeyPair, "error generating key pair"}

	// Query errors
	ErrBadAddress     = ProtocolError{IncorrectAddress, "address incorrect"}
	ErrGettingBalance = ProtocolError{InternalErrorGettingBalance, "error  getting balance"}
	ErrListValidators = ProtocolError{InternalErrorListValidators, "error getting list of validators"}

	// ONS errors
	ErrBadName        = ProtocolError{DomainMissing, "domain name not provided"}
	ErrBadOwner       = ProtocolError{OwnerAddressMissing, "owner address not provided"}
	ErrDomainNotFound = ProtocolError{DomainNotFound, "domain not found"}
	ErrFlagNotSet     = ProtocolError{OnSaleFlagNotSet, "onsale flag not set"}
)

Status declarations

Functions

This section is empty.

Types

type ProtocolError

type ProtocolError struct {
	Code int
	Msg  string
}

Protocol Error definition

func WrapError

func WrapError(err error, code int, msg string) *ProtocolError

func (ProtocolError) Error

func (se ProtocolError) Error() string

func (ProtocolError) ErrorMsg

func (se ProtocolError) ErrorMsg() string

func (ProtocolError) Wrap

func (se ProtocolError) Wrap(err error) *ProtocolError

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL