Error codes
Every layer of ArkFlow reports structured errors. This page maps each family: what the code means, the usual causes, the remediation, and where to read more.
Engine errors
The engine surfaces errors through thiserror types with contextual messages.
They appear in startup failures (--validate, process exit), stream failure
states, and logs. The actionable groups:
| Group | Typical message | Meaning / action |
|---|---|---|
| Configuration parse | YAML parsing error, Configuration parsing error: … | The config file is not parseable. Fix the syntax; validate with --validate. |
| Unknown key / component | Unknown configuration keys: adress, Unknown input type: kafka (requires the 'connectors-kafka' feature) | A typo, or a feature-gated type on a reduced build. Fix the key or rebuild with the feature. |
| Secret resolution | Failed to resolve secret reference at <path>: … | The referenced variable/file is missing. Set it or provide the file; errors never contain the value. |
| Component build/connect | … connection refused, authentication failed, dimension mismatch 4xx | The connector could not build or connect. Check endpoints, credentials, TLS. See troubleshooting. |
| WAL open/replay | WAL meta read failed, opening a corrupted WAL must surface an error | Fail-fast recovery refusal. Restore the WAL or accept the loss boundary. See WAL troubleshooting. |
| State / checkpoint | checkpoint '<id>' task set does not match the planned assignment | Recovery artifact and compiled plan disagree. Restore parallelism or rescale: true. |
| Job compile | invalid job plan …, join side with multiple subtasks | The DAG is illegal (unknown operator, multi-subtask join side). Fix the spec. |
| Processing | error_output routed batches, DLQ envelope | Row-level failure isolated to the dead-letter path. Inspect __dlq_* columns. |
Exit codes: 0 on success; 2 for usage/configuration errors (both binaries).
HTTP API problem types
The control-plane API answers errors with an HTTP status plus a code in the
problem body. Status semantics: 400 malformed request, 401 missing/invalid
credential, 403 authenticated but unauthorized, 404 unknown resource,
409 conflict, 429 rate limited (with Retry-After), 503 temporarily
unavailable.
| Status | Code | When / what to do |
|---|---|---|
400 | invalid_job_plan / invalid_job_spec | The job spec fails validation. Read the detail; fix the DAG. |
400 | invalid_user / invalid_credential | Malformed identity request (unknown role, oversized fields, rotating a revoked credential). |
400 | invalid_audit_query | Inverted from_ms/to_ms range. |
401 | unauthorized | No/invalid credential. Managed tokens are never retried as JWT; issue a new one. |
403 | forbidden | The role lacks the action (e.g. ReadAudit on /audit is admin/viewer). |
404 | user_not_found / credential_not_found / unknown route or resource | Check the id. |
409 | user_already_exists | Insert-only user creation conflict. |
409 | last_admin_required | The last enabled admin would be removed/demoted without a static credential. |
409 | user_limit / credential_limit | 1024 users / 16 active credentials reached. |
409 | oidc_subject_conflict | The OIDC subject is bound to another user. |
409 | approval_required | Rollout creation is gated; submit an approval request instead. |
409 | pause_requires_recovery_policy | The Job declares recovery: fail; pause needs a selectable artifact. |
409 | generation_conflict | A fenced write raced a newer generation; re-read and retry. |
429 | (rate limit) | Per-credential token bucket exhausted. Back off per Retry-After; see rate limits. |
503 | hub_standby | This Hub is a standby; route to the leader (leader_url hint). |
503 | stale_leader | A write raced a takeover; retry against the elected leader. |
503 | identity_store_unavailable / repository_unavailable / storage_unavailable | The Hub lacks durable storage or the store is unreachable. |
503 | node_unavailable | The target node has not reported recently; retry after it reconnects. |
503 | orchestration_in_progress | An equivalent operation is in flight; idempotent retry after it settles. |
503 | ai_provider_error | The Copilot's upstream provider failed; the control plane is unaffected. |
Job and node runtime codes
Operation and report payloads carry terminal codes for reconcile/commands:
| Code | Meaning |
|---|---|
job_not_found | The referenced job id does not exist on this Hub. |
node_unavailable | The command could not be dispatched (node offline); the intent stays durable. |
recovery_required | The start requires a recovery artifact that is missing/incompatible. |
network_shuffle | A split placement targeted a node without the data-plane capability — placement fails closed. |
Python SDK error families
All derive from arkflow.ArkFlowError (see
SDK errors):
| Exception | Trigger | Recovery |
|---|---|---|
ConfigError | Invalid config, missing feature, unusable state_path, no source/sink, to_yaml on in-memory pipelines, dict ingestion inference failures | Fix the configuration; rebuild with the named feature |
ExecutionError | Runtime failures, captured Rust panics, UDF tracebacks | Read the embedded traceback; the interpreter survives |
ConnectorError | Connection/auth failures | Retry with backoff or fix the endpoint/credentials |