Skip to content

Error messages should be user-friendly, not stack traces #116

@schpetbot

Description

@schpetbot

Problem

When an operation fails due to a non-existent issue (e.g., linear issue relation add FAKE-9999 blocks CLI-75), the CLI dumps a full GraphQL stack trace instead of a clean user-facing error message.

Current behavior:

Failed to create relation: Error: Entity not found: Issue: {"response":{"data":null,"errors":[{"message":"Entity not found: Issue","path":["issue"]...
    at runRequest (file:///home/exedev/.cache/deno/npm/registry.npmjs.org/graphql-request/7.2.0/src/legacy/helpers/runRequest.ts:105:12)
    at eventLoopTick (ext:core/01_core.js:187:7)
    ...

Expected behavior:

Could not find issue: FAKE-9999

Suggestion

Error messages should be clean and user-friendly by default. Stack traces should only be shown when something equivalent to RUST_BACKTRACE=1 is passed (e.g., --verbose, --debug, or LINEAR_DEBUG=1).

Affected commands

Found during testing of issue relation, but likely affects other commands that look up issues by identifier.

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