Error codes

Complete reference for workflow ErrorCode variants (16 total, K-03). Defined in runtime/arcflow-core/src/rcs/types.rs.

Errors surface in workflow results, trace events (WorkflowFailed, StepFailed), and HTTP API responses on the server.

SDK details: Python exception reference, TypeScript exception reference.

Workflow definition errors

WorkflowNotFound

AspectValue
Typical causeRegistry miss for workflow_ref name/version range
HTTP (server)404
PythonWorkflowExecutionError / infrastructure wrapper
TypeScriptWorkflowExecutionError
HandlingVerify registry publish; check semver range

InvalidWorkflowDefinition

AspectValue
Typical causeSchema validation or validate_graph failure
HTTP (server)400
PythonWorkflowConfigurationError
TypeScriptWorkflowConfigurationError
HandlingFix workflow JSON against v1.schema.json

UnsupportedRcsVersion

AspectValue
Typical causeWorkflow declares future workflow specification version
HTTP (server)400
PythonWorkflowConfigurationError
TypeScriptWorkflowConfigurationError
HandlingUpgrade runtime or downgrade workflow version

Execution errors

StepExecutionFailed

AspectValue
Typical causeAgent or step terminal failure
HTTP (server)422 or 500
PythonWorkflowExecutionError
TypeScriptWorkflowExecutionError
HandlingInspect trace; fix agent config or input

ToolExecutionFailed

AspectValue
Typical causeTool handler returned error
HTTP (server)422
PythonToolExecutionError
TypeScriptToolExecutionError
HandlingFix tool implementation or inputs at workflow design time

InternalError

AspectValue
Typical causeUnexpected engine error
HTTP (server)500
PythonWorkflowExecutionError
TypeScriptWorkflowExecutionError
HandlingRetry; escalate with run_id and trace export

Provider errors

ProviderError

AspectValue
Typical causeLLM API error (4xx/5xx from provider)
HTTP (server)502
PythonProviderExecutionError
TypeScriptProviderExecutionError
HandlingCheck provider status, key, model id

EmbeddingError

AspectValue
Typical causeEmbedding provider failure during ingest/RAG
HTTP (server)502
PythonProviderExecutionError / memory errors
TypeScriptProvider or memory error types
HandlingVerify ARCFLOW_EMBEDDING_PROVIDER and API key

RerankError

AspectValue
Typical causeCohere or rerank provider failure
HTTP (server)502
PythonProvider-related exception
TypeScriptProvider error types
HandlingVerify COHERE_API_KEY and hybrid config

Infrastructure errors

MemoryError

AspectValue
Typical causeQdrant or Postgres memory backend unavailable
HTTP (server)503
PythonMemoryOperationError, InfrastructureUnavailableError
TypeScriptMemory / infrastructure errors
HandlingCheck ARCFLOW_QDRANT_URL, Postgres, network

Timeout

AspectValue
Typical causeWorkflow or step timeout exceeded
HTTP (server)408
PythonWorkflowTimeoutError
TypeScriptTimeout error types
HandlingIncrease exec_config timeouts or optimize steps

RateLimited

AspectValue
Typical causeProvider 429 or Relay site RPM exceeded
HTTP (server)429
PythonMay surface as provider or execution error
TypeScriptProvider rate limit handling
HandlingBackoff; raise site rate_limit_rpm if legitimate traffic

HITL errors

HumanTimeout

AspectValue
Typical causeHITL approval window expired
HTTP (server)408
PythonHITL-related execution error
TypeScriptHITL error types
HandlingRe-run or extend HitlConfig.timeout_seconds

HumanRejected

AspectValue
Typical causeApprover returned approved: false
HTTP (server)422
PythonHumanRejectedError
TypeScriptHITL rejection types
HandlingExpected business outcome; branch workflow

ApprovalNotFound

AspectValue
Typical causeWrong approval_key on approve POST
HTTP (server)404
PythonHITL error
TypeScriptHITL error
HandlingUse interrupt payload key from GET run

AlreadyApproved

AspectValue
Typical causeDuplicate approve POST
HTTP (server)409
PythonHITL error
TypeScriptHITL error
HandlingTreat as idempotent success path in client

Quick lookup table

ErrorCodeHTTPCategory
WorkflowNotFound404Definition
InvalidWorkflowDefinition400Definition
UnsupportedRcsVersion400Definition
StepExecutionFailed422/500Execution
ToolExecutionFailed422Execution
InternalError500Execution
ProviderError502Provider
EmbeddingError502Provider
RerankError502Provider
MemoryError503Infrastructure
Timeout408Infrastructure
RateLimited429Infrastructure
HumanTimeout408HITL
HumanRejected422HITL
ApprovalNotFound404HITL
AlreadyApproved409HITL
CategoryClient behavior
DefinitionFail fast; fix workflow before retry
Provider / MemoryRetry with exponential backoff
RateLimitedHonor retry_after if present
HITLPoll GET run; present approve UI
TimeoutIncrease limits or split workflow

Trace correlation

Failed runs emit WorkflowFailed or StepFailed with error_code string matching enum names. Use trace export for support without logging user input.