Error Codes

All Hanflow errors extend HanflowError with a stable code, a retryable flag, and optional run_id, node_id, span_id, and details.

CodeClassRetryable
DSL_INVALIDDSLValidationErrorno
COMPILE_FAILEDCompileErrorno
NODE_FAILEDNodeExecutionErrorno
MAX_ITERMaxIterationsExceededno
HITL_TIMEOUTHITLTimeoutErrorno
MODEL_TIMEOUTModelTimeoutErroryes
MODEL_RATE_LIMITRateLimitErroryes
BUDGET_EXCEEDEDBudgetExceededErrorno
PRIVACY_VIOLATIONPrivacyViolationErrorno
TOOL_TIMEOUTToolTimeoutErroryes
MCP_CONN_FAILEDMCPConnectionErroryes
CHECKPOINT_CORRUPTCheckpointCorruptErrorno
DELEGATE_DEPTHMaxDelegateDepthExceededno
SUBWORKFLOW_DEPTHMaxSubworkflowDepthExceededno
CONFIG_INVALIDConfigValidationErrorno

Shape

{
  "code": "PRIVACY_VIOLATION",
  "message": "no local provider available",
  "retryable": false,
  "run_id": "run_01H...",
  "node_id": "llm_03cb",
  "details": { "sensitivity": "restricted" }
}

Retryable errors are candidates for the retry policy and fallback chain.