Reference
Errors
Every error has a stable code. Branch on the code, not the message.
{ "ok": false, "error": "environment_not_found" }Codes are stable; messages may change. Runtime codes use snake_case. Codes from the query engine use kebab-case.
Calling actions
| Code | Status | Meaning | Do |
|---|---|---|---|
execution_envelope_invalid | 400 | the body is not { requestId, input }, or requestId is not a UUID | fix the request |
action_contract_validation_failed | 400 | the input does not match the action's schema; your code did not run | fix the input |
action_not_found | 404 | no action with that id in the active release | check the id; publish the domain |
access_denied | 403 | you may not run this action or see its execution | |
environment_release_missing | 409 | the environment has no active release yet | publish a domain |
REQUEST_CONFLICT | 409 | this request id was already used for another action or input | use a new request id for a new call |
CONTRACT_MISMATCH | 409 | the contract hash you sent does not match the active release | reload the contract |
execution_result_timeout | 504 | the action did not finish within 110 s; it may still finish | follow GET /executions/{id} |
execution_total_file_size_exceeded · execution_file_limit_exceeded | 400 | file inputs over 128 MiB in total, or more than 16 files | |
execution_file_digest_mismatch | 422 | a file's content did not match its declared checksum | upload it again |
execution_not_found · run_not_found | 404 | no execution or run with that id, or not yours |
Inside an execution
These do not come back as an HTTP error: the call answers 200 and the execution carries the code.
| Code | Meaning |
|---|---|
action_failed | your execute threw; the execution holds your message, up to 1000 characters |
execution_output_invalid | your action returned something that does not match output; writes it made stay |
workflow_failed | a workflow run failed or was cancelled |
Authentication
| Code | Status | Meaning | Do |
|---|---|---|---|
invalid_credentials | 401 | the token or key is missing, expired or revoked | sign in again, or mint a new user token |
organization_access_denied | 403 | the caller is not a member of the environment's organization | check the organization and key |
session_access_denied | WebSocket close 4401 / 4403 | the live-query socket's token is not valid for this environment | mint a token for this environment |
Environments
| Code | Status | Meaning | Do |
|---|---|---|---|
environment_not_found | 404 | no environment with that handle, or not visible to you | check the handle and organization |
environment_release_unavailable | 502 | the active release could not be loaded | retry |
catalog_migration_required | 409 | the organization still uses the previous project model | migrate it in the console |
managed_build_required | 410 | direct publishing is not allowed on this environment | release it instead |
schema_change_refused | 409 | the stored data does not allow a schema change; details.issues lists each one; nothing was applied | fix the data or the schema; see Changing the schema |
removal_unconfirmed | 409 | the publish removes something the domain declared | confirm with druntime push --yes or --delete <name> |
development_workflow_adapter_unavailable | 409 | workflow actions are not available in development yet | test the workflow in a production release |
Queries and writes
| Type | Status | Meaning |
|---|---|---|
permission-denied | 400 | a permission rule rejected the write |
validation-failed | 400 | the query or write is malformed |
record-not-unique | 400 | a write would give two objects the same value of a .unique() attribute |
rate-limited | 429 | this environment is blocked from further requests; contact us |
timeout | 429 | the query ran longer than 30 s; add an index or narrow it |
result-too-large | — | a live query result exceeded 8 MiB; paginate it |
Over HTTP (POST /query) these arrive as { "ok": false, "error": "data_provider_rejected" } with the status above. On the live-query socket they arrive as an error frame with the type.
Files
| Code | Status | Meaning |
|---|---|---|
storage_body_invalid | 400 | the signed-upload-url request is not a JSON object |
storage_body_too_large | 400 | the signed-upload-url request is over 1 MiB |
From the Platform SDK
The Platform SDK throws PlatformApiError with status, and today the code in message.