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
| Status | Meaning | Action |
|---|---|---|
200 | Success | — |
201 | Created | — |
400 | Bad request | Fix the request body or parameters |
401 | Unauthorized | Credentials are missing, invalid, expired or revoked |
402 | Subscription required | Cloud 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 |
403 | Forbidden | Not permitted: role, project scope or browser-only operation. /api/admin/* returns 401 when signed out and 403 for non-admins |
404 | Not found | Check the resource ID. A resource in another organization also returns 404 |
409 | Conflict | Duplicate resource, such as a token name |
429 | Rate limited | Wait and retry (see Retry-After) |
500 | Server error | Check whether a mutation succeeded before retrying; report persistent errors |
503 | Service unavailable | A 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.
| Error | What to do |
|---|---|
429 | The CLI waits and retries. In your own client, respect Retry-After. |
5xx or network failure | Safe requests use backoff. Before repeating a create, update or trigger, check whether it succeeded. |
Other 4xx | Fix the request, credentials or permissions first. |
| Timeout | Check 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: 60The CLI falls back to exponential backoff for non-numeric or negative values.
CLI exit codes
| Exit code | Meaning | Example |
|---|---|---|
0 | Success | Job completed, resource created |
1 | General error | Test failed, validation error |
2 | Authentication error | Invalid token, expired token |
3 | Configuration error | Missing config, invalid schema |
4 | Network / API error | API unreachable, 5xx response |
5 | Timeout | Operation exceeded --timeout |
130 | Interrupted | Cancelled 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"
fiCommon 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.