flyerr

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAbort = errors.New("abort")

ErrAbort is an error for when the CLI aborts

Functions

func Expected added in v0.5.11

func Expected(err error) error

Expected marks err as an expected outcome of a command, such as the user aborting or their own app failing, rather than a flyctl bug. Expected errors are not sent to Sentry. The message and the wrapped chain are unchanged, so the CLI output and errors.Is/As behave as before.

func GetErrorDescription added in v0.0.234

func GetErrorDescription(err error) string

func GetErrorDocUrl added in v0.1.79

func GetErrorDocUrl(err error) string

func GetErrorSuggestion added in v0.0.234

func GetErrorSuggestion(err error) string

func IsCancelledError added in v0.0.234

func IsCancelledError(err error) bool

func IsExpected added in v0.5.11

func IsExpected(err error) bool

IsExpected reports whether err, or anything it wraps, was marked Expected.

func PrintCLIOutput added in v0.0.234

func PrintCLIOutput(err error)

func StepLabel added in v0.5.11

func StepLabel(err error) error

StepLabel marks err as the name of the step that failed, joined onto the real cause with errors.Join. A label is not a failure of its own: whether the combined error is an expected outcome depends on the cause alone. The message and errors.Is/As are unchanged.

func WithSuggestion added in v0.4.96

func WithSuggestion(err error, suggestion string) error

WithSuggestion decorates err with user-facing advice while preserving its wrapping chain. A nil error or empty suggestion is returned unchanged.

Types

type ErrorDescription added in v0.0.234

type ErrorDescription interface {
	error
	Description() string
}

ErrorDescription is an error with a detailed description that will be printed before the CLI exits

type ErrorSuggestion added in v0.0.234

type ErrorSuggestion interface {
	error
	Suggestion() string
}

ErrorSuggestion is an error with suggested next steps that will be printed before the CLI exits

type FlyDocUrl added in v0.1.79

type FlyDocUrl interface {
	DocURL() string
}

type GenericErr added in v0.1.82

type GenericErr struct {
	Err      string
	Descript string
	Suggest  string
	DocUrl   string
}

func (GenericErr) Description added in v0.1.82

func (e GenericErr) Description() string

func (GenericErr) Error added in v0.1.82

func (e GenericErr) Error() string

func (GenericErr) FlyDocURL added in v0.1.82

func (e GenericErr) FlyDocURL() string

func (GenericErr) Suggestion added in v0.1.82

func (e GenericErr) Suggestion() string

Jump to

Keyboard shortcuts

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