TellWang
Dashboard

Error codes

Every non-2xx response from the control plane returns a stable JSON envelope:

error envelope
{
  "error": {
    "code": "CP_PROJECT_NOT_FOUND",
    "message": "no active project with that wok_id in this org",
    "hint": "verify the wok_id and that it belongs to your org",
    "correlation_id": "1aee612b1250f276"
  }
}

code is the stable machine-readable identifier — classify on this. message is human-prose. hint is the remediation. correlation_id echoes back the cp's per-request id; include it when filing a ticket so the operator can pull the journal.

Below: the codes a customer is most likely to hit, with the side that fixes each (caller = your client code; state = the wok or org needs to be in a different state; platform = open a ticket).

Authentication & authorization

CodeHTTPFix sideRemediation
CP_UNAUTHENTICATED401callerSend Authorization: Bearer <skl_…> (or sllm_… for the LLM gateway). Sessions and bootstrap tokens both work where listed.
CP_INVALID_KEY401callerThe Bearer doesn't match the expected shape (skl_<hex> or sllm_<hex>). Check for whitespace + truncation.
CP_LLM_KEY_INVALID401callerThe sllm_ key has been revoked or doesn't exist. Mint a fresh one via POST /v1/llm-keys.
CP_INVALID_CREDENTIALS401callerEmail/password on /login don't match. Re-check the credentials.
CP_WEAK_PASSWORD400callerSign-up password doesn't meet the 8+ character minimum.
CP_USER_NOT_IN_ORG403callerThe Bearer is valid but the caller isn't a member of the requested org. Either pass the right slug or have the org owner invite you.

Not found / wrong state

CodeHTTPFix sideRemediation
CP_ROUTE_NOT_FOUND404callerNo route at that METHOD PATH. Typically a URL typo. The message echoes back the method + path so you can spot the typo. See API reference for the canonical endpoint catalogue.
CP_METHOD_NOT_ALLOWED405callerThe path exists but the HTTP method doesn't. e.g. DELETE /v1/healthz when healthz only accepts GET. Check the route's allowed methods in API reference.
CP_PROJECT_NOT_FOUND404caller / stateNo active wok with that id in this org. Note: cross-org access deliberately returns 404 not 403, to avoid enumeration. Verify via GET /v1/woks.
CP_ORG_NOT_FOUND404callerNo org with that slug. Slugs are case-sensitive.
CP_NOT_ACTIVE409stateThe wok is destroyed (terminal). Provision a fresh one via POST /v1/woks.
CP_STATUS_STALE503stateThe wok status row hasn't been refreshed by the reconciler yet. Retry in 5s.
CP_FUNCTION_NOT_FOUND404caller / stateNo function with that name on the wok. List via GET /v1/woks/{id}/functions.
CP_TRIGGER_NOT_FOUND404callerNo installed trigger with that name. List via GET /v1/woks/{id}/triggers.

Validation

CodeHTTPFix sideRemediation
CP_BAD_JSON400callerRequest body isn't valid JSON, or required fields are missing. The message names the field.
CP_INVALID_NAME400callerIdentifier doesn't match the expected regex (e.g. wok ids ^[a-z][a-z0-9]{0,30}$, env-var names ^[A-Z][A-Z0-9_]{0,63}$). The message spells out the actual regex.
CP_INVALID_BODY400callerJSON-valid but semantically wrong (e.g. bulk-env with both vars and dotenv, or cron expression that doesn't parse).
CP_BULK_TOO_LARGE413callerBatch exceeds the per-call cap (200 vars on bulk env). Split into multiple requests.
CP_SQL_TOO_LARGE413callerexec_sql body exceeds 1 MiB. Split into smaller migrations.
CP_LLM_BODY_TOO_LARGE413callerLLM chat-completions body exceeds 1 MiB. Trim history or use a smaller system prompt.

Capacity & rate limits

CodeHTTPFix sideRemediation
CP_WOK_QUOTA_EXCEEDED402callerYou're at your plan's wok limit. Upgrade via POST /v1/orgs/{slug}/billing/checkout/subscription or delete an unused wok.
CP_LLM_INSUFFICIENT_BALANCE402callerBoth prepaid meters (tokens + requests) have hit zero. Top up via POST /v1/llm-keys/{prefix}/topup, or configure BYOK via PUT /v1/orgs/{slug}/llm-byok to pay the upstream directly.

Upstream / platform

CodeHTTPFix sideRemediation
CP_DB_QUERY_FAILED500platformThe cp's own Postgres returned an error. Check GET /v1/diag for the cp_db subsystem; file a ticket with correlation_id.
CP_DUMP_DB_NOT_READY503stateWok's db container hasn't finished provisioning. Retry in 5–10s.
CP_EXEC_SQL_FAILED502stateThe docker-exec call into the wok's db container failed (often because it's restarting). Retry; if persistent, hit /diag/wok/{id}.
CP_LLM_UPSTREAM_FAILED502platform / BYOKThe configured LLM upstream (DeepSeek default or your BYOK URL) returned a non-2xx or timed out. Check upstream status; the X-LLM-Source response header tells you which side answered.
CP_EMAIL_UPSTREAM_FAILED502platformThe Resend API call failed. The message echoes Resend's status. Common cause: the sending domain hasn't been verified yet.
CP_DOMAIN_UPSTREAM_FAILED502platformCloudflare Registrar or DNS API call failed. The message echoes CF's response.
CP_FUNCTIONS_NOT_ENABLED503stateThis wok was provisioned before functions shipped and has no functions_port allocated. The reconciler heals this on its next sweep, or call POST /v1/woks/{id}/restart to force it.

Beyond this list

For every other code emitted by the cp, the response envelope's hint field gives the same remediation a customer support reply would. Hits to /diag (see Diagnostics) are the canonical "what's wrong" surface; correlation_id ties a single request across cp logs + downstream container logs + the audit log.