errorutils

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 3 Imported by: 206

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func CheckResponseStatus added in v0.2.2

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

Check expected status codes and return error if needed

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