nautechsystems/nautilus_trader · error · anyhow::Error

No durable store configured; refusing to update execution tr

Error message

No durable store configured; refusing to update execution transaction

What it means

update_execution_transaction_status persists a status change for a stored execution transaction, but it requires a configured durable database. With no database on the cache, it refuses the update instead of dropping the status change silently.

Source

Thrown at crates/adapters/blockchain/src/cache/mod.rs:223

        })?;

        database.ensure_execution_transaction_schema().await
    }

    /// Updates the status of a persisted execution transaction record, failing closed when no
    /// database is attached.
    ///
    /// # Errors
    ///
    /// Returns an error if no database is configured or the database operation fails.
    pub async fn update_execution_transaction_status(
        &self,
        chain_id: u32,
        transaction_hash: &str,
        status: &str,
    ) -> anyhow::Result<()> {
        let database = self.database.as_ref().ok_or_else(|| {
            anyhow::anyhow!("No durable store configured; refusing to update execution transaction")
        })?;

        database
            .update_execution_transaction_status(chain_id, transaction_hash, status)
            .await
    }

    /// Loads an execution transaction record by chain ID and transaction hash, failing closed
    /// when no database is attached.
    ///
    /// # Errors
    ///
    /// Returns an error if no database is configured or the database operation fails.
    pub async fn get_execution_transaction(
        &self,
        chain_id: u32,
        transaction_hash: &str,
    ) -> anyhow::Result<Option<ExecutionTransactionRow>> {

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Construct the cache with a database so status updates persist
  2. Guard the status-update call site to skip when no durable store is configured
  3. Supply the missing database configuration in the deployment environment
  4. Confirm the component holding the cache was initialized with the same database used for writes

Example fix

// before
let cache = BlockchainCache::new(chain, None);
cache.update_execution_transaction_status(1, &tx_hash, "confirmed").await?;
// after
let cache = BlockchainCache::new(chain, Some(database));
cache.update_execution_transaction_status(1, &tx_hash, "confirmed").await?;
Defensive patterns

Strategy: validation

Validate before calling

if cache.database.is_none() {
    eprintln!("cannot update transaction status: no durable store configured");
}

Type guard

fn is_persistent(cache: &BlockchainCache) -> bool {
    cache.database.is_some()
}

Try / catch

match cache.update_execution_transaction_status(chain_id, &tx_hash, "confirmed").await {
    Err(e) if e.to_string().contains("No durable store configured") => {
        // queue the update or report the missing configuration
    }
    other => other?,
}

Prevention

When it happens

Trigger: Calling update_execution_transaction_status(chain_id, tx_hash, status) on a BlockchainCache constructed without a database handle.

Common situations: Transaction lifecycle watchers running against a memory-only cache; deployments where the database option was dropped during refactor or env var missing; test harnesses using in-memory caches but reusing production callback code.

Understand the failure class

Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/6d57dd6a957fead3. Report an issue: GitHub.