Supercheck LogoSupercheck

Error handling

API error formats, status codes, retry behavior and CLI exit codesEdit

Error response format

Errors return a JSON body with an error field:

{
  "error": "Not found"
}

Some add context:

{
  "error": "Validation failed",
  "details": [
    { "field": "name", "message": "Name is required" }
  ]
}

HTTP status codes

StatusMeaningAction
200Success—
201Created—
400Bad requestFix the request body or parameters
401UnauthorizedCredentials are missing, invalid, expired or revoked
402Subscription requiredCloud only: the organization needs an active subscription for this action (for example resuming a monitor after a trial ended, declaring an incident, or scheduling, changing or extending a maintenance window). The body is { error, code }. code: "subscription_required" means subscribing fixes it. INVITE_MEMBER_LIMIT (accepting an invitation) means an owner must upgrade or free a seat. For other codes, follow the returned error message; contact support if it reports a problem with the organization's billing record
403ForbiddenNot permitted: role, project scope or browser-only operation. /api/admin/* returns 401 when signed out and 403 for non-admins
404Not foundCheck the resource ID. A resource in another organization also returns 404
409ConflictDuplicate resource, such as a token name
429Rate limitedWait and retry (see Retry-After)
500Server errorCheck whether a mutation succeeded before retrying; report persistent errors
503Service unavailableA safety limiter or dependency is down (for example the invitation or API-key verification limiter while Redis is down). Retry after Retry-After

Retry behavior

The CLI retries rate-limited requests and selected transient errors. It never replays POST or PATCH after server or network failures.

ErrorWhat to do
429The CLI waits and retries. In your own client, respect Retry-After.
5xx or network failureSafe requests use backoff. Before repeating a create, update or trigger, check whether it succeeded.
Other 4xxFix the request, credentials or permissions first.
TimeoutCheck connectivity and the operation's result before repeating it.

Retry-After header

On 429, Retry-After gives the seconds to wait:

HTTP/1.1 429 Too Many Requests
Retry-After: 60

The CLI falls back to exponential backoff for non-numeric or negative values.

CLI exit codes

Exit codeMeaningExample
0SuccessJob completed, resource created
1General errorTest failed, validation error
2Authentication errorInvalid token, expired token
3Configuration errorMissing config, invalid schema
4Network / API errorAPI unreachable, 5xx response
5TimeoutOperation exceeded --timeout
130InterruptedCancelled with Ctrl-C

CI/CD usage

# Capture the exit code before another command overwrites it
export SUPERCHECK_TRIGGER_KEY="sck_trigger_..."
export SUPERCHECK_TOKEN="sck_live_..."   # required here because --wait polls the run
supercheck job trigger $JOB_ID --wait
exit_code=$?

if [ $exit_code -eq 0 ]; then
  echo "All tests passed"
elif [ $exit_code -eq 1 ]; then
  echo "Tests failed"
elif [ $exit_code -eq 2 ]; then
  echo "Authentication issue — check SUPERCHECK_TRIGGER_KEY and, when using --wait, SUPERCHECK_TOKEN"
fi

Common errors

Invalid token

HTTP/1.1 401 Unauthorized
{"error": "Invalid or expired CLI token"}

The message varies (for example Authentication required, or Invalid token type for a trigger key used on a general endpoint).

Fix: Run supercheck whoami. Create a new token if needed.

Token expired or revoked

Expired, disabled and revoked tokens return 401 Unauthorized.

Fix: Run supercheck login --reauth or create a new token in the dashboard.

Insufficient permissions

HTTP/1.1 403 Forbidden
{"error": "Insufficient permissions"}

Fix: A CLI token inherits its creator's role and is limited to one project. Ask an organization admin to change your role, or use a token for the right project. Organization administration needs a browser session.

Organization pending deletion

HTTP/1.1 403 Forbidden
{"error": "This organization is scheduled for deletion and is read-only. The owner can cancel the deletion.", "code": "ORG_PENDING_DELETION"}

During the grace window reads work and every write returns this error, for any role. Only members see the code; others get the usual 403 or 404. The CLI shows the code under Details (details.code with --json), and MCP write tools return org_pending_deletion (MCP get_context reports organization.pendingDeletion).

Fix: The owner can cancel the deletion in organization settings. Otherwise export what you need before the window ends.

Resource not found

HTTP/1.1 404 Not Found
{"error": "Not found"}

Fix: Check the ID with supercheck job list, supercheck monitor list and similar.

Rate limited

HTTP/1.1 429 Too Many Requests
Retry-After: 60
{
  "error": "Rate limit exceeded",
  "message": "API key rate limit exceeded. Retry after 60 seconds.",
  "limit": 100,
  "remaining": 0,
  "resetAt": "2026-01-01T00:01:00.000Z"
}

This is the body from the job trigger endpoint. Other endpoints can return a shorter {"error": "Too many requests"}.

Fix: The CLI retries automatically. If you hit limits often, batch operations or space requests out.

Duplicate token name

HTTP/1.1 409 Conflict
{"error": "A CLI token with this name already exists"}

Fix: Use a unique name for the new CLI token.

On this page