{"record":{"id":"bbf868df46ba4aa7","repo":"nautechsystems/nautilus_trader","slug":"eth-call-request-failed","errorCode":null,"errorMessage":"eth_call request failed","messagePattern":"eth_call request failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/rpc/http.rs","lineNumber":542,"sourceCode":"        if let Some(from) = from {\n            call[\"from\"] = serde_json::json!(from);\n        }\n        let request = serde_json::json!({\n            \"jsonrpc\": \"2.0\",\n            \"id\": 1,\n            \"method\": \"eth_call\",\n            \"params\": [call, block_parameter(Some(block))],\n        });\n        let bytes = self\n            .send_rpc_request(request, Some(EXECUTION_RPC_TIMEOUT_SECS))\n            .await\n            .map_err(|e| match e {\n                BlockchainRpcClientError::ClientError(message)\n                    if message.contains(\"redirect response rejected\") =>\n                {\n                    anyhow::anyhow!(\"eth_call redirect rejected\")\n                }\n                _ => anyhow::anyhow!(\"eth_call request failed\"),\n            })?;\n        let parsed = serde_json::from_slice::<RpcNodeHttpResponse<String>>(bytes.as_ref())\n            .map_err(|_| anyhow::anyhow!(\"Failed to parse eth_call response\"))?;\n\n        if parsed.jsonrpc.is_none()\n            && let (Some(code), Some(message)) = (parsed.code, parsed.message)\n        {\n            if eth_call_error_is_revert(code, &message) {\n                return Ok(RpcCallResult::Reverted);\n            }\n            anyhow::bail!(\"eth_call RPC error {code}\");\n        }\n\n        if let Some(error) = parsed.error {\n            if eth_call_error_is_revert(error.code, &error.message) {\n                return Ok(RpcCallResult::Reverted);\n            }\n            anyhow::bail!(\"eth_call RPC error {}\", error.code);","sourceCodeStart":524,"sourceCodeEnd":560,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/rpc/http.rs#L524-L560","documentation":"Catch-all error for `eth_call` requests: any transport error from `send_rpc_request` that is not a rejected redirect (connection failure, timeout, TLS, HTTP errors) is surfaced as \"eth_call request failed\". The specific cause is not included in the message.","triggerScenarios":"`call_at` failing due to node unreachability, EXECUTION_RPC_TIMEOUT_SECS elapsing, connection reset, DNS failure, or non-redirect HTTP error statuses from the endpoint.","commonSituations":"eth_call timeouts on heavy contract simulations, node rate limiting or blocking, provider outage, or network partitions between client and node.","solutions":["Check node health with a lightweight call (eth_chainId) to distinguish transport vs method issues","Increase the execution RPC timeout or reduce gas/complexity of the call","Inspect underlying client logs for the concrete transport error","Add retry with backoff for transient network failures"],"exampleFix":"// before: single attempt, opaque failure\nlet out = client.call_at(&tx, Some(block)).await?;\n// after: retry transient failures with backoff\nlet out = match client.call_at(&tx, Some(block)).await {\n    Ok(v) => v,\n    Err(e) if is_transient(&e) => {\n        tokio::time::sleep(Duration::from_millis(250)).await;\n        client.call_at(&tx, Some(block)).await?\n    }\n    Err(e) => return Err(e),\n};","handlingStrategy":"try-catch","validationCode":"// pre-flight: node reachable and responsive\n// curl -sf -X POST $URL -H 'Content-Type: application/json' \\\n//   -d '{\"jsonrpc\":\"2.0\",\"method\":\"eth_chainId\",\"params\":[],\"id\":1}'","typeGuard":null,"tryCatchPattern":"match client.call_at(&tx, block).await {\n    Err(e) if e.to_string() == \"eth_call request failed\" => {\n        // inspect transport cause via logs; retry transient failures with backoff\n    }\n    other => other,\n}","preventionTips":["Implement retry with exponential backoff for eth_call","Size gas/complexity so calls complete within EXECUTION_RPC_TIMEOUT_SECS","Monitor provider status pages and maintain fallback endpoints","Log underlying client errors, since this message omits the cause"],"tags":["rpc","http","eth-call","request-failed"],"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-14T00:17:10.932Z"}