errors

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrContentNotFound is used to indicate that content at a given address could not be found.
	ErrContentNotFound = errors.New("content not found")

	// ErrWitnessesNotFound is used to indicate that no witnesses could not be found.
	ErrWitnessesNotFound = errors.New("witnesses not found")
)

Functions

func IsBadRequest added in v0.1.3

func IsBadRequest(err error) bool

IsBadRequest returns true if the given error is a 'bad request' error.

func IsTransient

func IsTransient(err error) bool

IsTransient returns true if the given error is a 'transient' error.

func NewBadRequest added in v0.1.3

func NewBadRequest(err error) error

NewBadRequest returns a 'bad request' error that wraps the given error in order to indicate to the caller that the request was invalid.

func NewBadRequestf added in v1.0.0

func NewBadRequestf(format string, a ...interface{}) error

NewBadRequestf returns a 'bad request' error in order to indicate to the caller that the request was invalid.

func NewTransient

func NewTransient(err error) error

NewTransient returns a transient error that wraps the given error in order to indicate to the caller that a retry may resolve the problem, whereas a non-transient (persistent) error will always fail with the same outcome if retried.

func NewTransientf added in v1.0.0

func NewTransientf(format string, a ...interface{}) error

NewTransientf returns a transient error in order to indicate to the caller that a retry may resolve the problem, whereas a non-transient (persistent) error will always fail with the same outcome if retried.

Types

This section is empty.

Jump to

Keyboard shortcuts

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