pub enum Error {
Show 29 variants
LspInitFailed {
message: String,
},
LspServerError {
code: i32,
message: String,
},
McpServer(String),
DocumentNotFound(PathBuf),
NoServerForLanguage(String),
NoServerConfigured,
Config(String),
ConfigNotFound(PathBuf),
InvalidConfig(String),
Io(Error),
Json(Error),
TomlDe(Error),
TomlSer(Error),
Transport(String),
Timeout(u64),
Shutdown,
ServerSpawnFailed {
command: String,
source: Error,
},
LspProtocolError(String),
InvalidUri(String),
EncodingError(String),
ServerTerminated,
InvalidToolParams(String),
FileIo {
path: PathBuf,
source: Error,
},
PathOutsideWorkspace(PathBuf),
DocumentLimitExceeded {
current: usize,
max: usize,
},
FileSizeLimitExceeded {
size: u64,
max: u64,
},
PartialServerInit {
failed_count: usize,
total_count: usize,
failures: Vec<ServerSpawnFailure>,
},
AllServersFailedToInit {
count: usize,
failures: Vec<ServerSpawnFailure>,
},
NoServersAvailable(String),
}Expand description
The main error type for mcpls-core operations.
Variants§
LspInitFailed
LSP server failed to initialize.
LspServerError
LSP server returned an error response.
McpServer(String)
MCP server error.
DocumentNotFound(PathBuf)
Document was not found or could not be opened.
NoServerForLanguage(String)
No LSP server configured for the given language.
NoServerConfigured
No LSP server is currently configured.
Config(String)
Configuration error.
ConfigNotFound(PathBuf)
Configuration file not found.
InvalidConfig(String)
Invalid configuration format.
Io(Error)
I/O error.
Json(Error)
JSON serialization/deserialization error.
TomlDe(Error)
TOML deserialization error.
TomlSer(Error)
TOML serialization error.
Transport(String)
LSP client transport error.
Timeout(u64)
Request timeout.
Shutdown
Server shutdown requested.
ServerSpawnFailed
LSP server failed to spawn.
LspProtocolError(String)
LSP protocol error during message parsing.
InvalidUri(String)
Invalid URI format.
EncodingError(String)
Position encoding error.
ServerTerminated
Server process terminated unexpectedly.
InvalidToolParams(String)
Invalid tool parameters provided.
FileIo
File I/O error occurred.
PathOutsideWorkspace(PathBuf)
Path is outside allowed workspace boundaries.
DocumentLimitExceeded
Document limit exceeded.
FileSizeLimitExceeded
File size limit exceeded.
PartialServerInit
Partial server initialization - some servers failed but at least one succeeded.
Fields
failures: Vec<ServerSpawnFailure>Details of each failure.
AllServersFailedToInit
All configured LSP servers failed to initialize.
Fields
failures: Vec<ServerSpawnFailure>Details of each failure.
NoServersAvailable(String)
No LSP servers available (none configured or all failed).