Plan Limit Exceeded

plan-limit-exceeded · 402

The account's plan doesn't allow another one of these, so the API created nothing.

limit names the allowance, limitValue what the plan allows and currentCount what the account already has. The fix is a plan change or removing one, never a card.

Besides the members every error carries, this type adds planKey, limit, limitValue and currentCount.

Common causes

  • The account already has as many projects, services, buckets or members as its plan allows, or the project as many environments, or its buckets together hold as many GB as the plan allows. For buckets, code is CAP_BLOCKED.
  • A log query reaches further back than the plan keeps logs, or the call asks for more replicas or manual backups than the plan allows.

How to fix the call

  • Tell the user which allowance is spent, from limit, limitValue and currentCount.
  • Remove one that is no longer needed, if the user agrees, then retry.
  • Or move to a plan with more headroom: ghaym cloud billing set-plan --plan <key>. A plan change is the user's decision.
  • Don't retry unchanged: the count doesn't drop on its own. The CLI exits with code 7 on a 402.

Example response

json
{
  "type": "plan-limit-exceeded",
  "title": "Plan Limit Exceeded",
  "detail": "The solo plan allows 2 environments-per-project, and this account already has 2. Move to a plan with more headroom with PUT /v1/billing/account/plan, or remove one first.",
  "planKey": "solo",
  "limit": "environments-per-project",
  "limitValue": 2,
  "currentCount": 2,
  "requestId": "req-1785231000000-4f7b2c9ae",
  "timestamp": "2026-07-28T09:30:00.000Z",
  "path": "/v1/projects/0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401/environments",
  "method": "POST",
  "instance": "POST /v1/projects/0199e0a3-6f21-7c4a-9d18-2b7c5f3ad401/environments",
  "status": 402,
  "docs": "https://ghaym.me/docs/errors/plan-limit-exceeded"
}