{"record":{"id":"b60ba3691259fc60","repo":"nautechsystems/nautilus_trader","slug":"pool-analysis-failed-for-failures-pool-s","errorCode":null,"errorMessage":"Pool analysis failed for {failures} pool(s)","messagePattern":"Pool analysis failed for (.+?) pool\\(s\\)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/blockchain/analyze.rs","lineNumber":234,"sourceCode":"            }\n            Err(e) => {\n                failures = failures.saturating_add(1);\n                println!(\n                    \"{}\",\n                    pool_failure_json(\n                        &chain_name,\n                        &dex_name,\n                        &pool_address,\n                        to_block,\n                        &e.to_string()\n                    )\n                );\n            }\n        }\n    }\n\n    if failures > 0 {\n        anyhow::bail!(\"Pool analysis failed for {failures} pool(s)\");\n    }\n\n    Ok(())\n}\n\n#[expect(\n    clippy::fn_params_excessive_bools,\n    clippy::too_many_arguments,\n    reason = \"CLI command options map directly to clap fields\"\n)]\nasync fn analyze_pool_with_client(\n    data_client: &mut BlockchainDataClientCore,\n    dex_type: DexType,\n    pool_address: String,\n    from_block: Option<u64>,\n    to_block: u64,\n    reset: bool,\n    require_existing_snapshot: bool,","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/cli/src/blockchain/analyze.rs#L216-L252","documentation":"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.","triggerScenarios":"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.","commonSituations":"Batch-analyzing pools where some DEX types lack parsers or RPC endpoints are rate-limited; stale pool addresses no longer exist on chain.","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"],"exampleFix":"// before\nnautilus blockchain analyze --pools poolA,poolB,poolC   # poolC unsupported\n// after\nnautilus blockchain analyze --pools poolA,poolB          # analyze poolC after adding its DEX parsers","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    run_analyze_pools(pools)\nexcept Exception as e:\n    if \"Pool analysis failed for\" in str(e):\n        for line in captured_logs:\n            print(line)  # per-pool failures precede the summary\n    raise","preventionTips":["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"],"tags":["cli","blockchain","batch","summary"],"backgroundTag":"api-request-failed","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}