Run NodesReference

errors

Package errors provides common error types and utilities for the Lux node.

import "github.com/luxfi/node/errors"

Package errors provides common error types and utilities for the Lux node.

Functions

IsClosed

func IsClosed(err error) bool

IsClosed checks if an error indicates a closed resource

IsNotFound

func IsNotFound(err error) bool

IsNotFound checks if an error is a "not found" error

IsPermanent

func IsPermanent(err error) bool

IsPermanent checks if an error is permanent and should not be retried

IsTemporary

func IsTemporary(err error) bool

IsTemporary checks if an error is temporary and can be retried

IsTimeout

func IsTimeout(err error) bool

IsTimeout checks if an error is a timeout

Join

func Join(errs ...error) error

Join combines multiple errors into a single error

Wrap

func Wrap(err error, category Category, message string) error

Wrap creates a new WrappedError with the given category and message

WrapWithContext

func WrapWithContext(err error, category Category, message string, context map[string]interface{}) error

WrapWithContext creates a new WrappedError with context information

Types

Category

Error categories for grouping related errors

func GetCategory(err error) Category

Multi

Multi combines multiple errors into a single error

func (m *Multi) Add(err error)
func (m *Multi) Err() error
func (m *Multi) Error() string

WrappedError

WrappedError provides context around an error

func (e *WrappedError) Error() string
func (e *WrappedError) Is(target error) bool
func (e *WrappedError) Unwrap() error