errors

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 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 IsInternalServerError added in v0.5.4

func IsInternalServerError(err error) bool

func IsInvalidAccessToken added in v0.5.4

func IsInvalidAccessToken(err error) bool

func IsServiceProviderError

func IsServiceProviderError(err error) bool

Types

type ServiceProviderError

type ServiceProviderError struct {
	StatusCode int
	Response   string
}

func (ServiceProviderError) Error

func (e ServiceProviderError) Error() string

Jump to

Keyboard shortcuts

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