Skip to main content
Version: Next

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:

GroupTypical messageMeaning / action
Configuration parseYAML parsing error, Configuration parsing error: …The config file is not parseable. Fix the syntax; validate with --validate.
Unknown key / componentUnknown 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 resolutionFailed 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 4xxThe connector could not build or connect. Check endpoints, credentials, TLS. See troubleshooting.
WAL open/replayWAL meta read failed, opening a corrupted WAL must surface an errorFail-fast recovery refusal. Restore the WAL or accept the loss boundary. See WAL troubleshooting.
State / checkpointcheckpoint '<id>' task set does not match the planned assignmentRecovery artifact and compiled plan disagree. Restore parallelism or rescale: true.
Job compileinvalid job plan …, join side with multiple subtasksThe DAG is illegal (unknown operator, multi-subtask join side). Fix the spec.
Processingerror_output routed batches, DLQ envelopeRow-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.

StatusCodeWhen / what to do
400invalid_job_plan / invalid_job_specThe job spec fails validation. Read the detail; fix the DAG.
400invalid_user / invalid_credentialMalformed identity request (unknown role, oversized fields, rotating a revoked credential).
400invalid_audit_queryInverted from_ms/to_ms range.
401unauthorizedNo/invalid credential. Managed tokens are never retried as JWT; issue a new one.
403forbiddenThe role lacks the action (e.g. ReadAudit on /audit is admin/viewer).
404user_not_found / credential_not_found / unknown route or resourceCheck the id.
409user_already_existsInsert-only user creation conflict.
409last_admin_requiredThe last enabled admin would be removed/demoted without a static credential.
409user_limit / credential_limit1024 users / 16 active credentials reached.
409oidc_subject_conflictThe OIDC subject is bound to another user.
409approval_requiredRollout creation is gated; submit an approval request instead.
409pause_requires_recovery_policyThe Job declares recovery: fail; pause needs a selectable artifact.
409generation_conflictA 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.
503hub_standbyThis Hub is a standby; route to the leader (leader_url hint).
503stale_leaderA write raced a takeover; retry against the elected leader.
503identity_store_unavailable / repository_unavailable / storage_unavailableThe Hub lacks durable storage or the store is unreachable.
503node_unavailableThe target node has not reported recently; retry after it reconnects.
503orchestration_in_progressAn equivalent operation is in flight; idempotent retry after it settles.
503ai_provider_errorThe 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:

CodeMeaning
job_not_foundThe referenced job id does not exist on this Hub.
node_unavailableThe command could not be dispatched (node offline); the intent stays durable.
recovery_requiredThe start requires a recovery artifact that is missing/incompatible.
network_shuffleA 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):

ExceptionTriggerRecovery
ConfigErrorInvalid config, missing feature, unusable state_path, no source/sink, to_yaml on in-memory pipelines, dict ingestion inference failuresFix the configuration; rebuild with the named feature
ExecutionErrorRuntime failures, captured Rust panics, UDF tracebacksRead the embedded traceback; the interpreter survives
ConnectorErrorConnection/auth failuresRetry with backoff or fix the endpoint/credentials