BoundaryML/baml · warning · LspError
Notification not supported: {0}
Error message
Notification not supported: {0} What it means
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.
Source
Thrown at baml_language/crates/baml_lsp/src/error.rs:13
//! The one LSP error type and its JSON-RPC code table.
use std::path::PathBuf;
/// Every failure a request or notification handler can report.
///
/// Serialized to the wire exclusively through [`LspError::to_response_error`];
/// the legacy `-32001 UnknownErrorCode` is never emitted.
#[derive(Debug, thiserror::Error)]
pub enum LspError {
#[error("{0}")]
NotificationExtractError(lsp_server::ExtractError<lsp_server::Notification>),
#[error("Notification not supported: {0}")]
NotificationNotSupported(String),
#[error("{0}")]
RequestExtractError(lsp_server::ExtractError<lsp_server::Request>),
#[error("Request not supported: {0}")]
RequestNotSupported(String),
#[error("Failed to serialize request result: {0}")]
RequestSerializeError(serde_json::Error),
/// The client's sink is gone; nothing more can be delivered.
#[error("Client closed")]
ClientClosed,
/// Bounded transport backpressure (LSP `RequestFailed`, `-32803`).
#[error("LSP outbound sink is saturated")]
OutboundSaturated,
/// A frame larger than the transport limit (LSP `RequestFailed`,
/// `-32803`).
#[error("LSP outbound frame exceeds the transport limit")]
OutboundOversized,
#[error("Invalid command arguments for command: {command}: {message}")]View on GitHub (pinned to bd85ce9dee)
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
Example fix
// before: crash/propagate on unknown notification
return Err(LspError::NotificationNotSupported(method));
// after: log and continue
log::debug!("ignoring unsupported notification: {method}");
Ok(()) Defensive patterns
Strategy: fallback
Type guard
fn is_unsupported_notification(e: &LspError) -> Option<&str> {
if let LspError::NotificationNotSupported(m) = e { Some(m) } else { None }
} Try / catch
match result {
Err(LspError::NotificationNotSupported(m)) => log::debug!("skipped notification {m}"),
other => other?,
} Prevention
- Only send notifications the server advertised in its initialize capabilities
- Keep the server's notification dispatch table in sync with its advertised clientCapabilities
When it happens
Trigger: 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.
Common situations: Clients sending unsupported/$$ notifications, workspace/didChangeWatchedFiles without registration, or newer LSP notification types added after the server was written.
Related errors
- Request not supported: {0}
- {0}
- Failed to serialize request result: {0}
- no filesystem is attached to this server ({})
- Client closed
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/569e9bb4e6595f03.
Report an issue: GitHub.