OneOS Docs
Genesis 0.3.3 Console

Concepts

Errors

Every failure, whether the gateway or a service raised it, comes back in one envelope with a stable code. The HTTP status tells you the class of failure, and every response carries an x-request-id.

The envelope

{
  "error": {
    "type": "not_found",
    "code": "PROJECT_NOT_FOUND",
    "message": "project not found: prj_missing",
    "request_id": "a3c8a39c-624c-4fd5-bc1f-02750c840a0b",
    "docs_url": "https://os.one.ml/api/v1/errors#PROJECT_NOT_FOUND",
    "layer": "hives"
  }
}
FieldWhenMeaning
typealwaysThe class, matching the status: unauthorized, forbidden, not_found, rate_limited…
codealwaysStable and machine-readable. Branch on this, never on message.
messagealwaysOne sentence for people. It can change.
request_idalwaysThe same value as the x-request-id header.
docs_urlalwaysThe code's entry in the catalog for the gateway's codes; for a service's own code, the operation's page in the API reference lists its statuses.
layerwhen a service raised itThe service that refused, for example hives or silos.
required_scopeon SCOPE_MISSINGThe scope the operation needs.

Where codes come from

  • The gateway's own codes (CREDENTIAL_INVALID, SCOPE_MISSING, RATE_LIMITED…) are listed at Error codes, 295 in all, and as JSON at https://os.one.ml/api/v1/errors.
  • A service's own code passes through as the service named it, with layer set: PROJECT_NOT_FOUND from Hives, for example. Service codes are not in the gateway's catalog.
  • A service refusal with no code gets UPSTREAM_<status>, such as UPSTREAM_404, and the service's message.

By status

StatusWhat happenedWhat to do
400The path, query, header or body failed validation.Fix the request; retrying the same request fails the same way.
401No credential, or one that is invalid, expired or revoked.Send one Authorization: Bearer header with a live credential.
403The credential is valid but may not do this, often SCOPE_MISSING.Use a credential with required_scope, or a signed-in session.
404No such route, or no such resource in your organization.Check the path and id.
409The resource changed or already exists.Read the current state, then decide.
422The body is well-formed but not acceptable.Fix the field the message names.
429Too many requests for this principal.Wait Retry-After seconds. See Rate limits.
502 504The service answered badly or too slowly.Retry reads with backoff; for writes, see Idempotency.
503The service is unavailable or not enabled here.Check Status; honour Retry-After when present.

In the SDK, CLI and MCP

import { GenesisError, errorCatalog } from '@onesi/genesis'

try {
  await genesis.call('hives_delete_project', { project_id })
} catch (e) {
  if (!(e instanceof GenesisError)) throw e
  // e.status, e.type, e.code, e.message and e.requestId; errorCatalog(e) adds required_scope and docs_url.
  console.error(e.status, e.code, e.requestId, errorCatalog(e).required_scope)
}

When you contact support, include the request_id.

L1fe AI Inc. · Built from Genesis 0.3.3 and the live gateway on 2026-10-25. Support