Qeet Docs
API reference

Errors

The canonical error envelope, HTTP status mapping, and idiomatic handling per language.

Every Qeet ID API error uses the same canonical envelope — an error object with a stable machine code, a human message, and optional detail / request_id:

JSON
{
  "error": {
    "code": "unauthorized",
    "message": "authentication required",
    "detail": "missing or invalid Authorization header",
    "request_id": "req_01HXG…"
  }
}

It's nested under `error`

The envelope is { "error": { "code", "message" } } — not a flat error string. Read the machine value from error.code. The request_id matches the X-Request-Id response header.

HTTP status mapping

StatusMeaning
400Malformed request.
401Missing or invalid authentication.
403Authenticated but not permitted.
404Resource doesn't exist.
409Conflict (e.g. duplicate).
422Validation error.
429Rate-limited / locked out. See Retry-After.
5xxServer error — retry idempotent calls with backoff.

Common codes

error.codeWhen
unauthorizedMissing/invalid token or API key.
forbiddenRBAC/policy denied the action.
not_foundResource ID doesn't exist.
conflictUniqueness/state conflict.
validation_failedRequest body failed validation.
rate_limitedRate limit or account lockout hit.

Handling errors

TypeScript
import { QeetidError, RateLimitError } from "@qeetid/sdk";

try {
  await qeetid.users.get(id);
} catch (e) {
  if (e instanceof RateLimitError) await wait(e.retryAfterSeconds);
  else if (e instanceof QeetidError) console.error(e.code, e.requestId);
  else throw e;
}
Go
var apiErr *qeetidsdk.Error
if errors.As(err, &apiErr) {
  switch {
  case apiErr.IsRateLimited(): // apiErr.RetryAfterSeconds
  case apiErr.IsNotFound():
  case apiErr.IsUnauthorized():
  }
}
Python
from qeetid import QeetidError, RateLimitError

try:
    qeetid.users.get(id)
except RateLimitError as e:
    sleep(e.retry_after_seconds)
except QeetidError as e:
    log(e.code, e.request_id)

Retry guidance

StatusRetry?Strategy
5xx (idempotent)YesExponential backoff.
429YesHonor Retry-After.
Other 4xxNoSurface to the caller.

The SDKs already implement this — 429 and idempotent 5xx are retried with backoff, honoring Retry-After.

On this page