Sanity Library Reference Docs
    Preparing search index...

    Thrown when a guard deploy fails after its state move committed and the engine could not cleanly undo the result — any of: the rollback write itself failed; the move created sibling docs (spawn) that a parent-only rollback cannot undo; or a multi-guard deploy partially applied, so even a clean state rollback leaves the earlier guards orphaned (PartialGuardDeployError). The workflow's persisted state and its deployed guards are now divergent and need manual reconciliation; the engine screams rather than leaving the inconsistency silent.

    Hierarchy (View Summary)

    • WorkflowError<"workflow-state-diverged">
      • WorkflowStateDivergedError
    Index

    Constructors

    • Parameters

      • args: {
            guardError: unknown;
            instanceId: string;
            reason: string;
            rollbackError?: unknown;
        }

      Returns WorkflowStateDivergedError

    Properties

    cause?: unknown
    guardError: unknown

    The guard-deploy failure that triggered the (attempted) rollback.

    instanceId: string
    kind: "workflow-state-diverged"
    message: string
    name: string
    rollbackError?: unknown

    The rollback failure, when rollback was attempted and itself failed.

    stack?: string