Documentation
¶
Overview ¶
Package errors provides user-friendly error handling for GitScrum CLI
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotAuthenticated = &CLIError{ Message: "You're not logged in yet", Suggestion: "Run 'gitscrum auth login' to get started", Code: "AUTH_REQUIRED", } ErrNoWorkspace = &CLIError{ Message: "No workspace configured", Suggestion: "Run 'gitscrum config set workspace <slug>' to set a default workspace", Code: "NO_WORKSPACE", } ErrNoProject = &CLIError{ Message: "No project specified", Suggestion: "Use --project flag or run 'gitscrum config set project <slug>'", Code: "NO_PROJECT", } ErrNotInGitRepo = &CLIError{ Message: "Not in a git repository", Suggestion: "Navigate to a git repository or use explicit flags", Code: "NOT_GIT_REPO", } ErrNoTaskCode = &CLIError{ Message: "Could not detect task code from branch", Suggestion: "Specify the task code explicitly, e.g. 'gitscrum tasks view a1b2c3d4'", Code: "NO_TASK_CODE", } )
Common error types
Functions ¶
func FormatError ¶
FormatError returns a formatted error string for printing
Types ¶
type CLIError ¶
CLIError represents a user-friendly CLI error
func HandleAPIError ¶
HandleAPIError converts HTTP errors to friendly messages
func NewWithSuggestion ¶
NewWithSuggestion creates a new CLIError with suggestion
func WrapWithSuggestion ¶
WrapWithSuggestion creates a CLIError with a suggestion
Click to show internal directories.
Click to hide internal directories.