errors

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: CC0-1.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// Use the same error code with Aurora Plus infra
	TxsStatus = 3

	// -32000 to -32768 are reserved for pre-defined errors by JSON-RPC standard.
	Generic               = -32000
	LogRangeLimitExceeded = -32005
	InvalidRequest        = -32600
	MethodNotFound        = -32601
	InvalidParams         = -32602
	Internal              = -32603
	ParseError            = -32700

	// -32900 to -32999 space is reserved for Aurora Relayer application specific errors.
	KeyNotFound = -32900
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataError added in v1.1.0

type DataError interface {
	Error() string     // returns the message
	ErrorData() string // returns the error data
}

type Error

type Error interface {
	Error() string  // returns the message
	ErrorCode() int // returns the code
}

type GenericError

type GenericError struct{ Err error }

func (*GenericError) Error

func (e *GenericError) Error() string

func (*GenericError) ErrorCode

func (e *GenericError) ErrorCode() int

type InternalError added in v1.1.0

type InternalError struct{ Message string }

func (*InternalError) Error added in v1.1.0

func (e *InternalError) Error() string

func (*InternalError) ErrorCode added in v1.1.0

func (e *InternalError) ErrorCode() int

type InvalidParamsError

type InvalidParamsError struct{ Message string }

received rpc request parameters not valid

func (*InvalidParamsError) Error

func (e *InvalidParamsError) Error() string

func (*InvalidParamsError) ErrorCode

func (e *InvalidParamsError) ErrorCode() int

type InvalidRequestError added in v1.1.0

type InvalidRequestError struct{ Message string }

received rpc request not valid

func (*InvalidRequestError) Error added in v1.1.0

func (e *InvalidRequestError) Error() string

func (*InvalidRequestError) ErrorCode added in v1.1.0

func (e *InvalidRequestError) ErrorCode() int

type KeyNotFoundError

type KeyNotFoundError struct{}

func (*KeyNotFoundError) Error

func (e *KeyNotFoundError) Error() string

func (*KeyNotFoundError) ErrorCode

func (e *KeyNotFoundError) ErrorCode() int

type LogResponseRangeLimitError

type LogResponseRangeLimitError struct{ Err error }

func (*LogResponseRangeLimitError) Error

func (*LogResponseRangeLimitError) ErrorCode

func (e *LogResponseRangeLimitError) ErrorCode() int

type MethodNotFoundError

type MethodNotFoundError struct{ Method string }

func (*MethodNotFoundError) Error

func (e *MethodNotFoundError) Error() string

func (*MethodNotFoundError) ErrorCode

func (e *MethodNotFoundError) ErrorCode() int

type SubscriptionNotFoundError added in v1.1.0

type SubscriptionNotFoundError struct{ Subscription string }

provided event subscription method does not exist

func (*SubscriptionNotFoundError) Error added in v1.1.0

func (e *SubscriptionNotFoundError) Error() string

func (*SubscriptionNotFoundError) ErrorCode added in v1.1.0

func (e *SubscriptionNotFoundError) ErrorCode() int

type TxsRevertError

type TxsRevertError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Data    string `json:"data,omitempty"`
}

func (*TxsRevertError) Error

func (e *TxsRevertError) Error() string

func (*TxsRevertError) ErrorCode

func (e *TxsRevertError) ErrorCode() int

func (*TxsRevertError) ErrorData

func (e *TxsRevertError) ErrorData() string

type TxsStatusError

type TxsStatusError struct{ Message string }

func (*TxsStatusError) Error

func (e *TxsStatusError) Error() string

func (*TxsStatusError) ErrorCode

func (e *TxsStatusError) ErrorCode() int

Jump to

Keyboard shortcuts

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