{"record":{"id":"f9fda13f0beb68cd","repo":"astral-sh/ruff","slug":"32602","errorCode":"-32602","errorMessage":"Invalid command `{name}`","messagePattern":"Invalid command `(.+?)`","errorType":"validation","errorClass":"ruff_server::server::api::Error","httpStatus":null,"severity":"error","filePath":"crates/ruff_server/src/server.rs","lineNumber":369,"sourceCode":"        [\n            SupportedCommand::Format,\n            SupportedCommand::FixAll,\n            SupportedCommand::OrganizeImports,\n            SupportedCommand::Debug,\n        ]\n    }\n}\n\nimpl FromStr for SupportedCommand {\n    type Err = anyhow::Error;\n\n    fn from_str(name: &str) -> anyhow::Result<Self, Self::Err> {\n        Ok(match name {\n            \"ruff.applyAutofix\" => Self::FixAll,\n            \"ruff.applyFormat\" => Self::Format,\n            \"ruff.applyOrganizeImports\" => Self::OrganizeImports,\n            \"ruff.printDebugInformation\" => Self::Debug,\n            _ => return Err(anyhow::anyhow!(\"Invalid command `{name}`\")),\n        })\n    }\n}\n\ntype PanicHook = Box<dyn Fn(&PanicHookInfo<'_>) + 'static + Sync + Send>;\n\nstruct ServerPanicHookHandler {\n    hook: Option<PanicHook>,\n    // Hold on to the strong reference for as long as the panic hook is set.\n    _client: Arc<Client>,\n}\n\nimpl ServerPanicHookHandler {\n    fn new(client: Client) -> Self {\n        let hook = std::panic::take_hook();\n        let client = Arc::new(client);\n\n        // Use a weak reference to the client because it must be dropped when exiting or the","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/astral-sh/ruff/blob/672bb4edf04c84f8b0753346359daee4057158f2/crates/ruff_server/src/server.rs#L351-L387","documentation":"Error \"Invalid command `{name}`\" thrown in astral-sh/ruff.","triggerScenarios":"Thrown at crates/ruff_server/src/server.rs:369 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"672bb4edf04c84f8b0753346359daee4057158f2","analyzedAt":"2026-08-16T08:54:05.464Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}