{"record":{"id":"598d28545b7a2093","repo":"nautechsystems/nautilus_trader","slug":"no-feed-handler-found-for-dataset-dataset","errorCode":null,"errorMessage":"No feed handler found for dataset: {dataset}","messagePattern":"No feed handler found for dataset: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/databento/src/data.rs","lineNumber":291,"sourceCode":"            return true;\n        }\n\n        false\n    }\n\n    fn send_subscription_to_dataset(\n        &self,\n        dataset: &str,\n        price_precision: Option<(Symbol, u8)>,\n        subscription: Subscription,\n        start_after_subscribe: bool,\n    ) -> anyhow::Result<()> {\n        let tx = {\n            let channels = self.cmd_channels.lock();\n            channels\n                .get(dataset)\n                .cloned()\n                .ok_or_else(|| anyhow::anyhow!(\"No feed handler found for dataset: {dataset}\"))?\n        };\n\n        send_subscription_commands(\n            &tx,\n            dataset,\n            price_precision,\n            subscription,\n            start_after_subscribe,\n        )\n    }\n\n    fn send_close_to_active_feeds(&self) {\n        let channels = self.cmd_channels.lock();\n        for (dataset, tx) in channels.iter() {\n            if let Err(e) = tx.send(HandlerCommand::Close) {\n                log::warn!(\"Failed to send close command to dataset {dataset}: {e}\");\n            }\n        }","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/databento/src/data.rs#L273-L309","documentation":"Subscriptions are routed to a per-dataset feed handler via an internal command channel registry (`cmd_channels`). If no feed handler has been created for the dataset — typically because connect() has not run or the handler for that dataset was never established — `send_subscription_to_dataset` fails with this error.","triggerScenarios":"Calling any of the subscribe_* methods for an instrument whose dataset has no entry in `cmd_channels` — i.e. subscribing before connect() or for a dataset whose feed handler failed to start.","commonSituations":"Subscribing before calling connect(), a feed handler startup failure that was silently ignored, subscriptions racing the async connect path, or mixing datasets where only some handlers were created.","solutions":["Ensure connect() has completed successfully before subscribing","Check logs for feed handler startup failures for that dataset and fix the root cause","Reconnect to recreate feed handlers, then retry the subscription","Verify the instrument resolves to the expected dataset and that this dataset was initialized"],"exampleFix":"// before\nclient.connect().await; // not awaited\nclient.subscribe_quotes(instrument_id).await?;\n// after\nclient.connect().await?;\nclient.subscribe_quotes(instrument_id).await?;","handlingStrategy":"validation","validationCode":"if !client.is_connected() {\n    anyhow::bail!(\"call connect() before subscribing\");\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = client.subscribe_quotes(instrument_id).await {\n    if e.to_string().contains(\"No feed handler found for dataset\") {\n        client.disconnect().await.ok();\n        client.connect().await?;\n        client.subscribe_quotes(instrument_id).await?;\n    }\n}","preventionTips":["Always await connect() and check its result before any subscribe_* call","Initialize all datasets you will use during connect, not lazily","Avoid subscribing from a different task before connect completes (use a started signal)"],"tags":["databento","subscription","feed-handler","lifecycle"],"backgroundTag":"invalid-state-transition","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"}