Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.
This repository was archived by the owner on Mar 12, 2026. It is now read-only.

feat: improve error messages with actionable next steps #91

Description

@brigleb

Summary

Enhance error messages to include actionable suggestions and next steps, helping users recover from errors more easily.

Current Behavior

Error: no todo list specified. Use --list flag or run 'bc4 todo set' to set a default

Proposed Behavior

Error: No default todo list configured

To fix this, you can either:
  1. Set a default: bc4 todo set
  2. Specify a list: bc4 todo add "Task" --list "My List"
  3. View available lists: bc4 todo lists

Learn more: bc4 todo --help

Implementation

  1. Create helper functions in internal/errors/ for common error scenarios
  2. Include contextual suggestions based on the operation
  3. Add "Learn more" links to relevant help

Common Error Scenarios to Improve

  • No project selected
  • No todo list selected
  • Authentication expired
  • Resource not found
  • Permission denied
  • Invalid URL format

Files to Modify

  • Create internal/errors/suggestions.go
  • Update error handling in cmd/todo/add.go
  • Update error handling in cmd/card/add.go
  • Update error handling in cmd/message/post.go
  • etc.

Reference

GitHub CLI provides excellent error messages with suggestions:

gh pr create
? No default remote found. Would you like to set origin as the default? Yes

Extracted from PR #79 discoverability analysis

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions