You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c290a10
Browse filesBrowse the repository at this point in the historyBrowse files
feat(cli): Tell users when Seer is out of credits (#2150)
`sentry issue explain` and `sentry issue plan` treat every 402 from the
autofix endpoint as "Seer requires a paid plan" and offer a free trial.
An org on token-based billing that runs out of Seer credits gets that
message too. A run that starts and then stops for credits reads as
"Analysis completed but no root causes found" or "Plan creation failed".
- A 402 with `code: "seer_out_of_credits"` (added in
getsentry/sentry#130284) now raises a new `out_of_credits` Seer error.
Any other 402, including `seer_out_of_quota` and the 402 with no code
that older Sentry versions send, keeps the current no-budget error.
- A run that ends with `failure_reason: "out_of_credits"` raises the
same error from both commands.
- The error has its own exit code, 43, and is left out of the free trial
prompt.
What the user sees:
```
Your organization is out of Seer credits.
Someone with billing access can adjust Seer spend and auto-reload in Sentry:
https://my-org.sentry.io/settings/billing/overview/?product=seer
```
A failed run is still retried on the next invocation, so someone who
topped up recovers by running the command again.
The 402 comes from getsentry/sentry#130283 and getsentry/sentry#130284,
which have both merged. Sentry's credit checks are behind the
`organizations:seer-credit-checks` flag, so for an org without it the
CLI behaves as it does today. The MCP equivalent is #2031.
Fixes CW-3075
0 commit comments