errors

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidBaseURI = NewError(fmt.Sprintf("%s is invalid", cliflags.BaseURIFlag))

Functions

func AccessTokenInvalidErrMessage added in v1.1.0

func AccessTokenInvalidErrMessage(baseURI string) string

func NewError

func NewError(message string) error

func NewErrorWrapped

func NewErrorWrapped(message string, underlying error) error

func NewLDAPIError

func NewLDAPIError(err error) error

NewLDAPIError converts the error returned from API calls to LaunchDarkly to have a consistent Error() JSON structure.

Types

type APIError

type APIError struct {
	// contains filtered or unexported fields
}

func NewAPIError

func NewAPIError(body []byte, err error, model interface{}) APIError

func (APIError) Body

func (e APIError) Body() []byte

func (APIError) Error

func (e APIError) Error() string

func (APIError) Model

func (e APIError) Model() interface{}

type Error

type Error struct {
	// contains filtered or unexported fields
}

func (Error) Error

func (e Error) Error() string

func (Error) Is

func (e Error) Is(err error) bool

func (Error) Unwrap

func (e Error) Unwrap() error

type LDAPIError

type LDAPIError interface {
	Body() []byte
	Error() string
	Model() interface{}
}

LDAPIError is an error from the LaunchDarkly API client.

Jump to

Keyboard shortcuts

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