Skip to content

fix: only send unknown or intentionally tracked errors to Segment#136

Merged
angeloashmore merged 2 commits intomainfrom
aa/intentional-errors
Apr 15, 2026
Merged

fix: only send unknown or intentionally tracked errors to Segment#136
angeloashmore merged 2 commits intomainfrom
aa/intentional-errors

Conversation

@angeloashmore
Copy link
Copy Markdown
Member

@angeloashmore angeloashmore commented Apr 15, 2026

Resolves: #131

Description

Previously, all errors were sent to Segment before being classified. Known/expected errors (user input mistakes, auth failures, missing config) added noise to analytics. Now only unknown errors and NoSupportedFrameworkError are tracked.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1


Note

Low Risk
Small change to telemetry/error-reporting behavior in the CLI; main risk is reduced visibility or altered analytics for some known error cases.

Overview
Adjusts CLI error handling in src/index.ts so Segment telemetry only includes error details for unexpected failures (and NoSupportedFrameworkError), while other known/expected errors end the event without an error payload.

This reorders the catch branches to classify CommandError earlier and avoids attaching error metadata for common user-facing failures (e.g., missing/invalid config, not-found), while still reporting unknown errors to both Segment and Sentry.

Reviewed by Cursor Bugbot for commit 5b214b3. Bugbot is set up for automated code reviews on this repo. Configure here.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

Resolves #131

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread src/index.ts
Known errors get `success: false` without an error message. Auth errors
and NoSupportedFrameworkError include the error message for product
signal. Unknown errors include the error message and are also sent to
Sentry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5b214b3. Configure here.

Comment thread src/index.ts
@angeloashmore angeloashmore merged commit 604e895 into main Apr 15, 2026
13 checks passed
@angeloashmore angeloashmore deleted the aa/intentional-errors branch April 15, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: only send unknown or intentionally tracked errors to Segment

1 participant