Skip to content

fix(error-reporting): silence SeerError on self-hosted (CLI-1WP) - #1651

Merged
BYK merged 1 commit into
mainfrom
seer/fix/cli-1wp-seer-error-silence
Sep 30, 2026
Merged

BYK merged 1 commit into
mainfrom
seer/fix/cli-1wp-seer-error-silence

Conversation

@sentry

@sentry sentry Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

This PR addresses issue CLI-1WP, where SeerError: Seer is not enabled for this organization. was being reported to Sentry for self-hosted instances.

Problem:
When sentry issue explain or sentry issue plan is run against a self-hosted Sentry instance where Seer is disabled, the CLI receives a 403 HTTP response. This is converted into a SeerError('not_enabled'). Because SeerError extends CliError (not ApiError), and classifySilenced() had no specific handling for SeerError, these expected feature-gate conditions were being captured as Sentry issues, polluting the issue tracker. For self-hosted users, Seer cannot be enabled or trialed, making these reports unactionable noise.

Solution:

  1. Added "seer_unavailable_self_hosted" to the SilenceReason union type in packages/cli/src/lib/error-reporting.ts.
  2. Modified classifySilenced() to return this new reason when a SeerError occurs and the CLI is not pointed at a SaaS (sentry.io) instance. This ensures that the error is silenced only for self-hosted environments.
  3. Added a seer_reason attribute to the cli.error.silenced metric when a SeerError is silenced. This allows tracking the volume of these events without creating Sentry issues.
  4. Ensured that SeerErrors on SaaS instances continue to be captured, as this is an intentional signal for marketing dashboards.
  5. Added unit tests to verify that SeerErrors are silenced on self-hosted configurations and captured on SaaS, and that the correct metric attributes are emitted.

This change prevents expected feature-gate conditions on self-hosted Sentry from being reported as CLI errors, while preserving the intended capture behavior for SaaS environments.

Fixes CLI-1WP

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Sep 30, 2026 10:44am UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Sep 30, 2026 10:44am UTC

Request Review

@BYK
BYK merged commit c133708 into main Sep 30, 2026
34 checks passed
@BYK
BYK deleted the seer/fix/cli-1wp-seer-error-silence branch September 30, 2026 11:17

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 83e0795e Deployed Sep 30, 2026 by vercel[bot]
Preview – sentry-local — 83e0795e Deployed Sep 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant