errors

package
v0.2023.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromHttpResponse added in v0.5.4

func FromHttpResponse(response *http.Response) error

FromHttpResponse returns a non-nil error if the provided response has a status code >= 400 and < 600 (i.e. auth and internal server errors). Note that the body of the response is consumed when the erroneous status code is detected so that it is preserved in the returned error object.

func IsServiceProviderHttpError added in v0.6.3

func IsServiceProviderHttpError(err error) bool

func IsServiceProviderHttpInternalServerError added in v0.6.3

func IsServiceProviderHttpInternalServerError(err error) bool

func IsServiceProviderHttpInvalidAccessToken added in v0.6.3

func IsServiceProviderHttpInvalidAccessToken(err error) bool

Types

type ServiceProviderHttpError added in v0.6.3

type ServiceProviderHttpError struct {
	StatusCode int
	Response   string
}

func (*ServiceProviderHttpError) Error added in v0.6.3

func (e *ServiceProviderHttpError) Error() string

Jump to

Keyboard shortcuts

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