Documentation ¶
Overview ¶
Package errors provides convenience functions for Kivik drivers to report meaningful errors. This package is not conisidered part of the kivik public API and is subject to change without notice.
Index ¶
- func Cause(err error) error
- func Errorf(format string, args ...interface{}) error
- func New(msg string) error
- func Reason(err error) string
- func Status(status int, msg string) error
- func StatusCode(err error) int
- func StatusCodeOK(err error) (code int, ok bool)
- func Statusf(status int, format string, args ...interface{}) error
- func Wrap(err error, msg string) error
- func WrapStatus(status int, err error) error
- func Wrapf(err error, format string, args ...interface{}) error
- type Reasoner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StatusCode ¶
StatusCode extracts an embedded HTTP status code from an error.
func StatusCodeOK ¶ added in v1.6.0
StatusCodeOK extracts an embedded HTTP status code from an error and returns it. ok will be false if the error does not embed a status code.
func WrapStatus ¶
WrapStatus bundles an existing error with a status code.
Types ¶
Click to show internal directories.
Click to hide internal directories.