nautechsystems/nautilus_trader · error · anyhow::Error
Pool analysis failed for {failures} pool(s)
Error message
Pool analysis failed for {failures} pool(s) What it means
run_analyze_pools analyzes multiple blockchain pools and counts per-pool failures. At the end, if any pool failed, it bails with a summary error reporting the failure count. The per-pool error details are logged above this message; this error is the aggregate exit signal.
Source
Thrown at crates/cli/src/blockchain/analyze.rs:234
}
Err(e) => {
failures = failures.saturating_add(1);
println!(
"{}",
pool_failure_json(
&chain_name,
&dex_name,
&pool_address,
to_block,
&e.to_string()
)
);
}
}
}
if failures > 0 {
anyhow::bail!("Pool analysis failed for {failures} pool(s)");
}
Ok(())
}
#[expect(
clippy::fn_params_excessive_bools,
clippy::too_many_arguments,
reason = "CLI command options map directly to clap fields"
)]
async fn analyze_pool_with_client(
data_client: &mut BlockchainDataClientCore,
dex_type: DexType,
pool_address: String,
from_block: Option<u64>,
to_block: u64,
reset: bool,
require_existing_snapshot: bool,View on GitHub (pinned to 18893faf8b)
Solutions
- Read the per-pool error lines logged before this summary to identify which pools failed and why
- Re-run analysis restricted to the failing pools (smaller --pools list) to isolate the cause
- Fix per-pool issues (RPC access, snapshot availability, supported DEX) then re-run the batch
- Add retry/backoff for transient RPC failures before re-running the batch
Example fix
// before nautilus blockchain analyze --pools poolA,poolB,poolC # poolC unsupported // after nautilus blockchain analyze --pools poolA,poolB # analyze poolC after adding its DEX parsers
Defensive patterns
Strategy: try-catch
Try / catch
try:
run_analyze_pools(pools)
except Exception as e:
if "Pool analysis failed for" in str(e):
for line in captured_logs:
print(line) # per-pool failures precede the summary
raise Prevention
- Check RPC endpoint health and rate limits before batch runs
- Pre-filter pools to supported DEX types
- Run batches in smaller groups so one bad pool doesn't obscure others
- Capture and review per-pool logs; the summary error only shows a count
When it happens
Trigger: Any analyzed pool fails (RPC errors, missing snapshots, unsupported DEX), causing failures > 0 after the loop over pools in run_analyze_pools, invoked via run_blockchain_command.
Common situations: Batch-analyzing pools where some DEX types lack parsers or RPC endpoints are rate-limited; stale pool addresses no longer exist on chain.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
- All --checkpoint-blocks exceed --to-block {to_block}
- --snapshot-from-rpc cannot be combined with --from-block
- --snapshot-from-rpc cannot be combined with --reset
- --snapshot-from-rpc cannot be combined with --require-existi
- DEX '{dex_type}' on chain '{}' cannot be analyzed: missing p
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/b60ba3691259fc60.
Report an issue: GitHub.