{"record":{"id":"4fe4a8f5be23eca5","repo":"nautechsystems/nautilus_trader","slug":"failed-to-fetch-products-e","errorCode":null,"errorMessage":"Failed to fetch products: {e}","messagePattern":"Failed to fetch products: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/coinbase/src/http/client.rs","lineNumber":1029,"sourceCode":"    /// Requests all instruments from Coinbase, optionally filtered by product type.\n    ///\n    /// Parses each supported product into a Nautilus [`InstrumentAny`] and caches\n    /// the results in the shared instrument map. Unsupported products (non-crypto\n    /// futures, `UNKNOWN` product types) are skipped with a debug log.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error when the HTTP request fails or the response cannot be\n    /// deserialized.\n    pub async fn request_instruments(\n        &self,\n        product_type: Option<CoinbaseProductType>,\n    ) -> anyhow::Result<Vec<InstrumentAny>> {\n        let json = self\n            .inner\n            .get_products()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"Failed to fetch products: {e}\"))?;\n        let response: ProductsResponse =\n            serde_json::from_value(json).map_err(|e| anyhow::anyhow!(e))?;\n\n        let ts_init = self.ts_now();\n        let mut instruments = Vec::with_capacity(response.products.len());\n\n        for product in &response.products {\n            if let Some(filter) = product_type\n                && product.product_type != filter\n            {\n                continue;\n            }\n\n            match parse_instrument(product, ts_init) {\n                Ok(instrument) => instruments.push(instrument),\n                Err(e) => {\n                    log::debug!(\n                        \"Skipping product '{}' during parse: {e}\",","sourceCodeStart":1011,"sourceCodeEnd":1047,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/coinbase/src/http/client.rs#L1011-L1047","documentation":"Raised by CoinbaseHttpClient::request_instruments when the underlying get_products() HTTP call to Coinbase's /products endpoint fails. The REST error is wrapped with context; parsing failures of the returned JSON raise separate errors afterward.","triggerScenarios":"Any request_instruments() call where get_products() returns Err: network failure, DNS failure, HTTP 4xx/5xx, timeout, or TLS problems against api.coinbase.com.","commonSituations":"No internet or corporate proxy blocking the API, Coinbase exchange API outage or rate limiting (429), invalid proxy_url configured, or wrong base/ws URL env.","solutions":["Check network connectivity and that api.coinbase.com is reachable from the host.","Inspect the wrapped {e} for HTTP status; handle 429 with backoff and retry.","Verify proxy_url in config is correct if behind a proxy.","Retry request_instruments after checking Coinbase status for outages."],"exampleFix":"// before\nlet instruments = client.request_instruments(None).await?;\n// after (retry with backoff)\nmatch client.request_instruments(None).await {\n    Ok(i) => i,\n    Err(e) => { tracing::warn!(\"products fetch failed: {e}\"); tokio::time::sleep(Duration::from_secs(5)).await; client.request_instruments(None).await?; }\n};","handlingStrategy":"retry","validationCode":"fn endpoint_reachable(url: &str) -> bool {\n    std::net::TcpStream::connect((url_host(url), 443)).is_ok()\n}","typeGuard":null,"tryCatchPattern":"match client.request_instruments(None).await {\n    Ok(i) => i,\n    Err(e) => { warn!(\"products fetch failed: {e}; retrying\"); backoff_retry(|| client.request_instruments(None)).await? }\n}","preventionTips":["Check connectivity/proxy settings before starting the node.","Respect Coinbase rate limits; add backoff around instrument requests.","Monitor Coinbase status for exchange API incidents."],"tags":["http","network","coinbase","rest-api"],"backgroundTag":"http-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"}