errors

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCreateURL is returned when the APIDataHandler cannot create a url.
	// This can occur if the provider does not have the necessary information
	// to create the url i.e. a malformed config.
	ErrCreateURL = errors.New("api data handler failed to create request")

	// ErrDoRequest is returned when the APIQueryHandler was unable to make
	// a request.
	ErrDoRequest = errors.New("api query handler failed to make the request")

	// ErrParseResponse is returned when the APIDataHandler cannot parse the response
	// from the request handler.
	ErrParseResponse = errors.New("api data handler failed to parse response")

	// ErrRateLimit is returned when the APIQueryHandler encounters a rate limit.
	ErrRateLimit = errors.New("api query handler encountered a rate limit")

	// ErrUnexpectedStatusCode is returned when the APIQueryHandler encounters an unexpected status code.
	ErrUnexpectedStatusCode = errors.New("api query handler encountered an unexpected status code")
)

Functions

func ErrCreateURLWithErr

func ErrCreateURLWithErr(err error) error

ErrCreateURLWithErr is used to create a new ErrCreateRequest with the given error. Provider's that implement the APIDataHandler interface should use this function to create the error.

func ErrDoRequestWithErr

func ErrDoRequestWithErr(err error) error

ErrDoRequestWithErr is used to create a new ErrDoRequest with the given error. Provider's that implement the APIQueryHandler interface should use this function to create the error.

func ErrParseResponseWithErr

func ErrParseResponseWithErr(err error) error

ErrParseResponseWithErr is used to create a new ErrParseResponse with the given error. Provider's that implement the APIDataHandler interface should use this function to create the error.

func ErrUnexpectedStatusCodeWithCode

func ErrUnexpectedStatusCodeWithCode(code int) error

ErrUnexpectedStatusCodeWithCode is used to create a new ErrUnexpectedStatusCode with the given code. Provider's that implement the APIQueryHandler interface should use this function to create the error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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