errorutils

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: Apache-2.0 Imports: 4 Imported by: 206

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CheckError = func(err error) error {
	return err
}

Functions

func CheckErrorf added in v1.6.1

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

func CheckResponseStatus added in v0.2.2

func CheckResponseStatus(resp *http.Response, expectedStatusCodes ...int) error

Check expected status codes and return error if needed

func GenerateResponseError added in v0.27.0

func GenerateResponseError(status, body string) error

Types

type OnErrorHandler

type OnErrorHandler func(error) error

Error modes (how should the application behave when the CheckError function is invoked):

Jump to

Keyboard shortcuts

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