Documentation
¶
Index ¶
- Variables
- func Expected(err error) error
- func GetErrorDescription(err error) string
- func GetErrorDocUrl(err error) string
- func GetErrorSuggestion(err error) string
- func IsCancelledError(err error) bool
- func IsExpected(err error) bool
- func PrintCLIOutput(err error)
- func StepLabel(err error) error
- func WithSuggestion(err error, suggestion string) error
- type ErrorDescription
- type ErrorSuggestion
- type FlyDocUrl
- type GenericErr
Constants ¶
This section is empty.
Variables ¶
var ErrAbort = errors.New("abort")
ErrAbort is an error for when the CLI aborts
Functions ¶
func Expected ¶ added in v0.5.11
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 GetErrorDocUrl ¶ added in v0.1.79
func GetErrorSuggestion ¶ added in v0.0.234
func IsCancelledError ¶ added in v0.0.234
func IsExpected ¶ added in v0.5.11
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
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
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
ErrorDescription is an error with a detailed description that will be printed before the CLI exits
type ErrorSuggestion ¶ added in v0.0.234
ErrorSuggestion is an error with suggested next steps that will be printed before the CLI exits
type GenericErr ¶ added in v0.1.82
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