Scrubby

Error Codes & Response Shapes

Standard error codes returned by the Scrubby REST API and MCP tools, with what they mean and how to recover.

Scrubby’s REST API and MCP tools return structured errors. This page lists the codes you’ll encounter, what they mean, and what to do about them.

Response shape

REST endpoints return JSON. Successful responses have a 2xx status; errors carry a 4xx or 5xx status with a body of the form:

{
  "error": "human-readable message",
  "code": "machine_friendly_code",
  "details": { /* optional, error-specific */ }
}

MCP tools return errors as MCP tool errors. Your editor renders the message; the same code field appears in the structured payload.

HTTP status codes

StatusMeaning
200 OKSuccess.
400 Bad RequestMalformed request body, missing required parameter, or invalid input.
401 UnauthorizedMissing or invalid auth token. Re-authenticate.
403 ForbiddenAuthenticated but not authorized for this resource (wrong org, wrong role).
404 Not FoundResource doesn’t exist or you don’t have access.
409 ConflictState conflict, e.g. trying to start an index when one is already running.
422 Unprocessable EntityValidation failed; details in details.
429 Too Many RequestsRate-limited. See Rate Limits & Quotas.
500 Internal Server ErrorServer-side bug. Retry once; if it persists, file an issue.

Common error codes

Auth

CodeWhen it happensWhat to do
not_authenticatedNo token, or token expired.Reconnect from your editor or re-login on the dashboard.
invalid_tokenToken is malformed or revoked.Generate a fresh token from your Account page.
oauth_failedOAuth callback failed (state mismatch, missing scope).Retry; clear any browser-side OAuth state. See Auth & OAuth Issues.

Repositories

CodeWhen it happensWhat to do
repo_not_foundThe named repo doesn’t exist or you don’t have access.Check the owner/repo path; check the GitHub App is installed.
repo_not_indexedThe repo isn’t indexed yet.Run scrubby_index first.
index_in_progressA previous index is still running.Wait a minute and retry, or check GET /v1/repositories/:id/index/status.
index_failedThe last index attempt errored out.See Indexing Stuck or Failing.

Analysis

CodeWhen it happensWhat to do
file_not_foundThe path isn’t in the indexed snapshot.Run an incremental index; the file may have been added recently.
no_filesChangeset analysis was called with no file paths and no staged changes.Stage some changes or pass file_paths explicitly.
unsupported_file_typeFile type isn’t supported (binary, oversized, etc.).Skip the file; not all formats are analyzable.

Billing

CodeWhen it happensWhat to do
plan_requiredAn action requires a plan you don’t have.Upgrade via Plans & Pricing.
seat_limit_reachedTrying to invite more members than your seat count allows.Add seats from the Team page.
payment_failedStripe rejected the payment method.Update billing in the Stripe portal.
trial_already_usedTrying to start a second trial.Each user gets exactly one trial.

Webhooks

CodeWhen it happensWhat to do
invalid_signatureWebhook signature failed verification.Check secrets; signature algorithm is HMAC SHA-256 for GitHub, Stripe SDK for Stripe.
unknown_eventWebhook event type isn’t one Scrubby handles.Silent ignore; no action needed.

Generic

CodeWhen it happensWhat to do
validation_failedInput failed schema validation.Check details for the specific field.
rate_limitedToo many requests in a short window.Back off; retry with exponential backoff.
internal_errorUnexpected server error.Retry once; if it persists, contact support.

Retry guidance

  • 5xx errors: retry with exponential backoff up to 3 attempts.
  • 429: back off based on the Retry-After header if present, otherwise wait 30 seconds.
  • 4xx errors except 429: don’t retry. Fix the request and try again.
  • index_in_progress / index_failed: poll GET /v1/repositories/:id/index/status rather than retrying the index trigger.

Last updated