errorutils

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func CheckErrorf

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

func CheckResponseStatus

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

Check expected status codes and return error if needed

func GenerateResponseError

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