errors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCursorNotFound = errors.New("cursor not found")

ErrCursorNotFound is returned when a cursor does not exist for a chain. This is expected for clean databases starting fresh.

View Source
var ErrReorgDetected = errors.New("reorg detected")

ErrReorgDetected is returned when reorg detected

Functions

func IsResponseTooBigError

func IsResponseTooBigError(err error) bool

func IsRetryableError

func IsRetryableError(err error) bool

IsRetryableError helper function to check if the error is retriable

Types

type HTTPError

type HTTPError struct {
	StatusCode int    `json:"statusCode"`
	Message    string `json:"message"`
}

func (*HTTPError) Error

func (e *HTTPError) Error() string

Error we need to implement the Error function to follow the error interface

type RPCError

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

func (*RPCError) Error

func (e *RPCError) Error() string

type ReorgError

type ReorgError struct {
	BlockNum  uint64 `json:"blockNum"`
	BlockHash string `json:"blockHash"`
}

func (*ReorgError) Error

func (e *ReorgError) Error() string

func (*ReorgError) Is

func (e *ReorgError) Is(target error) bool

Is makes ReorgError work with Error.Is()

Jump to

Keyboard shortcuts

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