Asset Core Docs

Deterministic world-state engine documentation and API references.

Decision Gate docs

Error Model

Asset Core uses standard HTTP status codes with RFC 9457 Problem Details error responses. This reference describes the error model and common error conditions. It is designed to be stable so clients can build predictable retry and remediation logic.

Overview

Errors are returned as application/problem+json payloads with a stable taxonomy, machine-readable codes, and optional retry guidance. The HTTP status code indicates the error category, while the body provides specifics. Treat the code field as the canonical machine-readable identifier.

Structure

Write/Read Error Response (Problem Details)

{
  "type": "urn:assetcore:error:CONTAINER_NOT_FOUND",
  "title": "NotFoundError",
  "status": 404,
  "detail": "Container 1001 not found",
  "code": "CONTAINER_NOT_FOUND",
  "retryable": false,
  "hint": "Verify the container ID",
  "server_correlation_id": "wr-0000000000000001-0000000000000042",
  "client_correlation_id": "client-req-2026-01-15",
  "details": {
    "container_id": 1001
  }
}

Error Detail Fields

FieldTypeDescription
typestringRFC 9457 type URI (Asset Core uses urn:assetcore:error:\CODE“)
titlestringShort error class name (ValidationError, NotFoundError)
statusintegerHTTP status code
detailstringHuman-readable explanation
codestringMachine-readable error identifier (SCREAMING_SNAKE_CASE)
retryablebooleanWhether clients should retry
retry_after_msintegerOptional retry-after hint in milliseconds (429/503)
hintstringOptional remediation hint
auth_reasonstringOptional auth denial reason (only when disclosure is reason_code)
server_correlation_idstringOptional server-assigned correlation ID
client_correlation_idstringOptional client-provided correlation ID
detailsobjectOptional structured details
core_errorobjectOptional serialized core error payload (write daemon only)

Fields

HTTP Status Codes

StatusMeaningWhen Used
200 OKSuccessRequest completed successfully
400 Bad RequestInvalid requestMalformed JSON, missing fields
401 UnauthorizedUnauthenticatedMissing or invalid bearer token
403 ForbiddenNot permittedPrincipal lacks permission or namespace access
404 Not FoundResource not foundContainer or class doesn’t exist
409 ConflictState conflictIdempotency key collision, already exists
422 Unprocessable EntityValidation failedOperation preconditions not met
425 Too EarlyStale readMinimum world sequence not reached (read endpoints)
429 Too Many RequestsRate limitedQuota or auth rate limits
500 Internal Server ErrorServer errorUnexpected failures
503 Service UnavailableTemporarily unavailableOverloaded, shutting down

Common Error Codes

Container Errors

CodeStatusDescription
CONTAINER_NOT_FOUND404The specified container doesn’t exist
CONTAINER_ALREADY_EXISTS409Container ID is already in use
WRONG_CONTAINER_KIND422Operation not supported for this container kind

Balance Errors

CodeStatusDescription
INVALID_QUANTITY422Quantity must be greater than zero
INSUFFICIENT_BALANCE422Not enough balance for the operation
INVALID_OPERATION422Operation would overflow or is invalid

Instance Errors

CodeStatusDescription
INSTANCE_NOT_FOUND404The specified instance doesn’t exist
ALREADY_ATTACHED409Instance already has a parent
NOT_ATTACHED422Instance has no parent to detach from
HAS_CHILDREN422Must detach children before burning
WOULD_CREATE_CYCLE422Attachment would create a cycle

Slot Errors

CodeStatusDescription
SLOT_OUT_OF_BOUNDS422Slot index exceeds container capacity
SLOT_OCCUPIED409Slot already contains an instance
SLOT_EMPTY422Slot doesn’t contain an instance

Schema Errors

CodeStatusDescription
UNREGISTERED_CLASS404The specified class isn’t registered
CLASS_ALREADY_EXISTS409Class ID is already registered
SHAPE_ALREADY_REGISTERED409Shape already exists for this class
UNREGISTERED_CLASS_SHAPE422Shape required but not registered

System Errors

CodeStatusDescription
INVALID_REQUEST400Malformed JSON or invalid parameters
PAYLOAD_TOO_LARGE413Request body exceeds configured limits
UNSUPPORTED_MEDIA_TYPE415Content-Type is not JSON
INTEGER_OVERFLOW500Numeric overflow (bug)
SERVICE_UNAVAILABLE503System is overloaded or shutting down

Examples

Bad Request (400)

Invalid JSON:

{
  "type": "urn:assetcore:error:INVALID_REQUEST",
  "title": "ValidationError",
  "status": 400,
  "detail": "Failed to parse JSON body",
  "code": "INVALID_REQUEST",
  "retryable": false,
  "details": {
    "position": 42,
    "expected": "string"
  }
}

Not Found (404)

Container doesn’t exist:

{
  "type": "urn:assetcore:error:CONTAINER_NOT_FOUND",
  "title": "NotFoundError",
  "status": 404,
  "detail": "Container 1001 does not exist",
  "code": "CONTAINER_NOT_FOUND",
  "retryable": false,
  "details": {
    "container_id": 1001
  }
}

Conflict (409)

Idempotency key already used with different content:

{
  "type": "urn:assetcore:error:IDEMPOTENCY_CONFLICT",
  "title": "ConflictError",
  "status": 409,
  "detail": "Idempotency key 'create-1001' was used with different request content",
  "code": "IDEMPOTENCY_CONFLICT",
  "retryable": false,
  "details": {
    "idempotency_key": "create-1001"
  }
}

Unprocessable Entity (422)

Insufficient balance:

{
  "type": "urn:assetcore:error:INSUFFICIENT_BALANCE",
  "title": "ValidationError",
  "status": 422,
  "detail": "Insufficient balance: requested 500, available 100",
  "code": "INSUFFICIENT_BALANCE",
  "retryable": false,
  "details": {
    "container_id": 1001,
    "class_id": 100,
    "key": 1,
    "requested": 500,
    "available": 100
  }
}

Service Unavailable (503)

System overloaded:

{
  "type": "urn:assetcore:error:SERVICE_UNAVAILABLE",
  "title": "UnavailableError",
  "status": 503,
  "detail": "System is at capacity, please retry later",
  "code": "SERVICE_UNAVAILABLE",
  "retryable": true,
  "retry_after_ms": 100,
  "details": {
    "queue_depth": 1000
  }
}