errors

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserError

type UserError struct {
	Message    string
	Suggestion string
}

UserError represents an error with a user-friendly message and optional suggestion

func AuthenticationFailed

func AuthenticationFailed() *UserError

AuthenticationFailed returns an error for failed authentication

func MutuallyExclusive

func MutuallyExclusive(arg, flag string) *UserError

MutuallyExclusive returns an error when mutually exclusive options are both provided

func NetworkError

func NetworkError(serverURL string, cause error) *UserError

NetworkError returns an error for network issues

func New

func New(message string) *UserError

New creates a new UserError with just a message

func NotAuthenticated

func NotAuthenticated() *UserError

NotAuthenticated returns an error for unauthenticated users

func NotFound

func NotFound(resource, id string) *UserError

NotFound returns an error for resources that don't exist

func PermissionDenied

func PermissionDenied(action string) *UserError

PermissionDenied returns an error for permission issues

func RequiredFlag

func RequiredFlag(flag string) *UserError

RequiredFlag returns an error for missing required flags in non-interactive mode

func WithSuggestion

func WithSuggestion(message, suggestion string) *UserError

WithSuggestion creates a new UserError with a message and suggestion

func (*UserError) Error

func (e *UserError) Error() string

Jump to

Keyboard shortcuts

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