Skip to content

Enhance error messages with actionable suggestions #16

@joelhooks

Description

@joelhooks

Problem

Current errors tell users what went wrong but not how to fix it. Books call this "empathetic error design".

Pattern from Go CLI Books

From "Building Modern CLI Applications in Go":

Current:

Error: daemon not running

Better:

Error: Failed to connect to daemon
  Socket path: ~/.agent-secrets/agent-secrets.sock

The daemon doesn't appear to be running. To start it:
  secrets serve &

Or check status with:
  secrets status

See 'secrets --help' for more information.

Action Items

  • Audit all error messages in cmd/secrets/
  • Add context (what file, what operation)
  • Add suggestion (how to fix)
  • Add help reference (where to learn more)

Error Message Template

type UserError struct {
    What       string   // What went wrong
    Why        string   // Why it matters (optional)
    Suggestion string   // How to fix it
    HelpRef    string   // Where to learn more
}

Book References

  • Search: pdf-brain search "error message user friendly" --fts --expand 2000
  • Search: pdf-brain search "empathetic error" --fts --expand 2000

Priority

P2 - Better UX

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions