errors

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: Apache-2.0 Imports: 1 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")
)

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 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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