Skip to content

cloacina-workflow::error

Rust

Error Types

This module defines the minimal error types needed for workflow authoring. These errors do not include database or runtime-specific variants, which are defined in the main cloacina crate.

Error Types

pub

Errors that can occur during context operations.

This minimal version only includes errors that can occur without database or runtime dependencies.

  • Serialization - JSON serialization/deserialization error
  • KeyNotFound - Key not found in context
  • TypeMismatch - Type mismatch when retrieving a value
  • KeyExists - Key already exists when inserting
  • Database - Database operation failed (infrastructure error, not a key issue)
  • ConnectionPool - Connection pool exhausted or unavailable

pub

Errors that can occur during task execution.

Task errors encompass execution failures, context issues, and any other problems that prevent a task from completing successfully.

  • ExecutionFailed - Task execution failed with a message
  • DependencyNotSatisfied - Task dependency not satisfied
  • Timeout - Task exceeded timeout
  • ContextError - Context operation error within a task
  • ValidationFailed - Task validation failed
  • Unknown - Unknown error
  • ReadinessCheckFailed - Task readiness check failed
  • TriggerRuleFailed - Trigger rule evaluation failed

pub

Errors that can occur during task checkpointing.

Checkpoint errors occur when tasks attempt to save intermediate state for recovery purposes.

  • SaveFailed - Failed to save checkpoint
  • LoadFailed - Failed to load checkpoint
  • Serialization - Checkpoint serialization error
  • StorageError - Checkpoint storage error
  • ValidationFailed - Checkpoint validation failed