{"record":{"id":"9713d76da0fcf879","repo":"nautechsystems/nautilus_trader","slug":"controller-execute-endpoint-not-registered","errorCode":null,"errorMessage":"Controller execute endpoint '{}' not registered","messagePattern":"Controller execute endpoint '(.+?)' not registered","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/system/src/controller.rs","lineNumber":67,"sourceCode":"\n    /// Sends a controller command to the registered controller endpoint.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the controller execute endpoint is not registered.\n    pub fn send(command: &ControllerCommand) -> anyhow::Result<()> {\n        let endpoint = Self::execute_endpoint();\n        let handler = {\n            let msgbus = get_message_bus();\n            msgbus\n                .borrow_mut()\n                .endpoint_map::<ControllerCommand>()\n                .get(endpoint)\n                .cloned()\n        };\n\n        let Some(handler) = handler else {\n            anyhow::bail!(\n                \"Controller execute endpoint '{}' not registered\",\n                endpoint.as_str()\n            );\n        };\n\n        handler.handle(command);\n        Ok(())\n    }\n\n    /// Executes a controller command against the underlying trader.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the requested lifecycle operation fails.\n    pub fn execute(&mut self, command: ControllerCommand) -> anyhow::Result<()> {\n        match command {\n            ControllerCommand::CreateActor(command) => self\n                .create_actor_from_config(&command.actor_config, command.start)","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/system/src/controller.rs#L49-L85","documentation":"Controller::send dispatches a ControllerCommand to a handler looked up in the controller's endpoint map. If the requested endpoint string is not registered, no handler exists to run, so send bails with the endpoint name. It protects against silently dropping commands sent to mistyped or unregistered endpoints.","triggerScenarios":"Calling controller.send(endpoint, command) (or issuing a control command over the bus) with an endpoint name that was never registered via register_endpoint — e.g. a typo, or sending a command before registration ran.","commonSituations":"Typo in the endpoint string; sending commands before the controller finished registering its handlers; a renamed endpoint after an upgrade; sending an endpoint that only exists in the Python controller from the Rust one.","solutions":["List the controller's registered endpoints and confirm the exact endpoint string you are sending","Fix the endpoint name (exact match, case-sensitive)","Ensure registration (register_endpoint / controller setup) completes before sending commands","If the endpoint requires Python actors (e.g. CreateActor for importable configs), use the Python-enabled build/controller"],"exampleFix":"// before\ncontroller.send(\"create_actor\".into(), command)?;\n// after: use the registered endpoint name\ncontroller.send(\"CreateActor\".into(), command)?;","handlingStrategy":"validation","validationCode":"// Check the endpoint exists before sending\n// (endpoint_map is internal; maintain the set of known endpoints in caller code)\nlet known_endpoints = [\"CreateActor\", \"CreateStrategy\", \"Start\", \"Stop\"];\nanyhow::ensure!(\n    known_endpoints.contains(&endpoint.as_str()),\n    \"unknown controller endpoint {endpoint}\"\n);","typeGuard":null,"tryCatchPattern":"match controller.send(endpoint.clone(), command) {\n    Err(e) if e.to_string().contains(\"not registered\") => {\n        log::warn!(\"endpoint {endpoint} unknown; did registration complete?\");\n    }\n    other => other?,\n}","preventionTips":["Centralize endpoint names in constants/enums","Ensure controller registration completes before dispatching commands","Match endpoint strings exactly against the controller's registered set after upgrades"],"tags":["rust","controller","rpc","endpoint"],"backgroundTag":"endpoint-not-registered","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"}