{"record":{"id":"95428398375365b4","repo":"jlcodes99/cockpit-tools","slug":"wakeupgateway-ls-languageserverstarted","errorCode":null,"errorMessage":"[WakeupGateway] 官方 LS LanguageServerStarted 解析失败: {}","messagePattern":"\\[WakeupGateway\\] 官方 LS LanguageServerStarted 解析失败: (.+?)","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"crates/cockpit-core/src/modules/wakeup_gateway.rs","lineNumber":1188,"sourceCode":"            \"text/plain; charset=utf-8\",\n        ));\n    }\n\n    if path_matches_rpc_method(&path, \"LanguageServerStarted\") {\n        match parse_official_ls_started_request(&parsed.body) {\n            Ok(started) => {\n                if let Ok(mut guard) = state.started_sender.lock() {\n                    if let Some(tx) = guard.take() {\n                        let _ = tx.send(started);\n                    }\n                }\n                return OfficialLsExtensionAction::Close(extension_unary_response(\n                    &content_type,\n                    &[],\n                ));\n            }\n            Err(err) => {\n                crate::modules::logger::log_error(&format!(\n                    \"[WakeupGateway] 官方 LS LanguageServerStarted 解析失败: {}\",\n                    err\n                ));\n                return OfficialLsExtensionAction::Close(text_response(\n                    400,\n                    \"Bad Request\",\n                    &err,\n                    \"text/plain; charset=utf-8\",\n                ));\n            }\n        }\n    }\n\n    if path_matches_rpc_method(&path, \"SubscribeToUnifiedStateSyncTopic\") {\n        let topic = match parse_subscribe_topic_from_connect_body(&parsed.body) {\n            Ok(v) => v,\n            Err(err) => {\n                crate::modules::logger::log_error(&format!(","sourceCodeStart":1170,"sourceCodeEnd":1206,"githubUrl":"https://github.com/jlcodes99/cockpit-tools/blob/1ed8b77992d62ca81fabf744deb0839ad361d5bf/crates/cockpit-core/src/modules/wakeup_gateway.rs#L1170-L1206","documentation":"Parse guard in the official LS extension RPC bridge: a request whose path matches the LanguageServerStarted method failed parse_official_ls_started_request, so the payload does not conform to the expected started-notification shape. The failure is logged and answered with a 400 'Bad Request' text response, closing the extension request rather than dispatching it to the waiting sender.","triggerScenarios":"Thrown at crates/cockpit-core/src/modules/wakeup_gateway.rs:1188 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Compare the request body against the expected LanguageServerStarted schema (missing/renamed fields)","Check whether an updated official LS version changed the payload shape and update the parser","Inspect the interpolated parse error for the exact field that failed"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1ed8b77992d62ca81fabf744deb0839ad361d5bf","analyzedAt":"2026-09-05T09:51:41.178Z","contentChangedAt":"2026-09-05T09:51:41.178Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}