mirror of
https://github.com/schpet/linear-cli.git
synced 2026-09-14 14:26:50 +08:00
430ac0402d
Fixes #116 Error messages are now clean and user-friendly by default. Stack traces are only shown when LINEAR_DEBUG=1 is set, similar to RUST_BACKTRACE. Changes: - Add src/utils/errors.ts with error handling infrastructure: - CliError base class with user-facing messages and suggestions - NotFoundError for entity lookups - ValidationError for invalid input - AuthError for authentication issues - handleError() for consistent error display - extractGraphQLMessage() to parse Linear API errors - Update all commands to use handleError() for consistent error display - Error output goes to stderr with ✗ prefix - GraphQL errors show userPresentableMessage when available Example before: Error: Entity not found: Issue: {"response":{"data":null... Example after: ✗ Issue not found: FAKE-9999
3.4 KiB
3.4 KiB