errors

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: GPL-3.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	REJECTED_BY_EP_OR_ACCOUNT     = -32500
	REJECTED_BY_PAYMASTER         = -32501
	BANNED_OPCODE                 = -32502
	SHORT_DEADLINE                = -32503
	BANNED_OR_THROTTLED_PAYMASTER = -32504
	INVALID_PAYMASTER_STAKE       = -32505
	INVALID_AGGREGATOR            = -32506
	INVALID_FIELDS                = -32602

	EXECUTION_REVERTED = -32521
)

Functions

func NewRPCError

func NewRPCError(code int, message string, data any) error

New returns a new custom RPCError.

Types

type RPCError

type RPCError struct {
	// contains filtered or unexported fields
}

RPCError is a custom error that fits the JSON-RPC error spec.

func (*RPCError) Code

func (e *RPCError) Code() int

Code returns the code field of the JSON-RPC error object.

func (*RPCError) Data

func (e *RPCError) Data() any

Data returns the data field of the JSON-RPC error object.

func (*RPCError) Error

func (e *RPCError) Error() string

Code returns the message field of the JSON-RPC error object.

Jump to

Keyboard shortcuts

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