{"record":{"id":"569e9bb4e6595f03","repo":"BoundaryML/baml","slug":"notification-not-supported-0","errorCode":null,"errorMessage":"Notification not supported: {0}","messagePattern":"Notification not supported: (.+?)","errorType":"exception","errorClass":"LspError","httpStatus":null,"severity":"warning","filePath":"baml_language/crates/baml_lsp/src/error.rs","lineNumber":13,"sourceCode":"//! The one LSP error type and its JSON-RPC code table.\n\nuse std::path::PathBuf;\n\n/// Every failure a request or notification handler can report.\n///\n/// Serialized to the wire exclusively through [`LspError::to_response_error`];\n/// the legacy `-32001 UnknownErrorCode` is never emitted.\n#[derive(Debug, thiserror::Error)]\npub enum LspError {\n    #[error(\"{0}\")]\n    NotificationExtractError(lsp_server::ExtractError<lsp_server::Notification>),\n    #[error(\"Notification not supported: {0}\")]\n    NotificationNotSupported(String),\n    #[error(\"{0}\")]\n    RequestExtractError(lsp_server::ExtractError<lsp_server::Request>),\n    #[error(\"Request not supported: {0}\")]\n    RequestNotSupported(String),\n    #[error(\"Failed to serialize request result: {0}\")]\n    RequestSerializeError(serde_json::Error),\n    /// The client's sink is gone; nothing more can be delivered.\n    #[error(\"Client closed\")]\n    ClientClosed,\n    /// Bounded transport backpressure (LSP `RequestFailed`, `-32803`).\n    #[error(\"LSP outbound sink is saturated\")]\n    OutboundSaturated,\n    /// A frame larger than the transport limit (LSP `RequestFailed`,\n    /// `-32803`).\n    #[error(\"LSP outbound frame exceeds the transport limit\")]\n    OutboundOversized,\n    #[error(\"Invalid command arguments for command: {command}: {message}\")]","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_lsp/src/error.rs#L1-L31","documentation":"LspError::NotificationNotSupported is produced when a notification method is received that this LSP server does not implement. thiserror formats it as 'Notification not supported: {method}'. It signals a capability negotiation or routing gap, not a protocol corruption.","triggerScenarios":"A client sends a notification whose method is not in the server's handled-method dispatch; the client enables a capability the server never advertised but sends notifications for anyway.","commonSituations":"Clients sending unsupported/$$ notifications, workspace/didChangeWatchedFiles without registration, or newer LSP notification types added after the server was written.","solutions":["Ignore or log-and-discard the unsupported notification if it is harmless","Update the server to handle the notification or stop advertising related capabilities","Fix client capability flags so it does not send notifications the server did not register"],"exampleFix":"// before: crash/propagate on unknown notification\nreturn Err(LspError::NotificationNotSupported(method));\n// after: log and continue\nlog::debug!(\"ignoring unsupported notification: {method}\");\nOk(())","handlingStrategy":"fallback","validationCode":null,"typeGuard":"fn is_unsupported_notification(e: &LspError) -> Option<&str> {\n    if let LspError::NotificationNotSupported(m) = e { Some(m) } else { None }\n}","tryCatchPattern":"match result {\n    Err(LspError::NotificationNotSupported(m)) => log::debug!(\"skipped notification {m}\"),\n    other => other?,\n}","preventionTips":["Only send notifications the server advertised in its initialize capabilities","Keep the server's notification dispatch table in sync with its advertised clientCapabilities"],"tags":["lsp","unsupported-method","rust"],"backgroundTag":"operation-not-supported","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}