errors

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrTypeHTTP          = "HTTP Error"
	ErrTypeIO            = "IO Error"
	ErrTypeInvalidMethod = "Invalid Method"
	ErrTypeAPI           = "API Error"
	ErrTypeJSON          = "JSON Error"
	ErrTypeAuth          = "Auth Error"
	ErrTypeTokenStore    = "Token Store Error"
)

Variables

This section is empty.

Functions

func IsAPIError

func IsAPIError(err error) bool

func IsAuthError

func IsAuthError(err error) bool

func IsErrorType

func IsErrorType(err error, errorType string) bool

func IsHTTPError

func IsHTTPError(err error) bool

func IsIOError

func IsIOError(err error) bool

func IsJSONError

func IsJSONError(err error) bool

Types

type Error

type Error struct {
	Type    string
	Message string
	// contains filtered or unexported fields
}

func NewAPIError

func NewAPIError(data json.RawMessage) *Error

func NewAuthError

func NewAuthError(message string, cause error) *Error

func NewError

func NewError(errorType, message string, cause error) *Error

func NewHTTPError

func NewHTTPError(cause error) *Error

func NewIOError

func NewIOError(cause error) *Error

func NewInvalidMethodError

func NewInvalidMethodError(method string) *Error

func NewJSONError

func NewJSONError(cause error) *Error

func NewTokenStoreError

func NewTokenStoreError(message string) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) Is

func (e *Error) Is(target error) bool

func (*Error) Unwrap

func (e *Error) Unwrap() error

Jump to

Keyboard shortcuts

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