zed-industries/zed · error

{} via {} failed: {}

Error message

{} via {} failed: {}

What it means

A generic LSP request wrapper: converting the request (e.g. a code lens or command) into LSP parameters failed for the given buffer/language server, and the failure is wrapped with the request display name and server name for context.

Source

Thrown at crates/project/src/lsp_store.rs:6129

                    method,
                    |capabilities| check(server_name, capabilities),
                    cx,
                )
            })
            .map(|(server_id, server_name)| (server_id, server_name.clone()))
            .collect()
    }

    pub fn request_lsp<R>(
        &mut self,
        buffer: Entity<Buffer>,
        server: LanguageServerToQuery,
        request: R,
        cx: &mut Context<Self>,
    ) -> Task<Result<R::Response>>
    where
        R: LspCommand,
        <R::LspRequest as lsp::request::Request>::Result: Send,
        <R::LspRequest as lsp::request::Request>::Params: Send,
    {
        if let Some((upstream_client, upstream_project_id)) = self.upstream_client() {
            return self.send_lsp_proto_request(
                buffer,
                upstream_client,
                upstream_project_id,
                request,
                cx,
            );
        }

        let query_outcome = buffer.update(cx, |buffer, cx| {
            let mut early_response = None;
            if let Some(local) = self.as_local() {
                for (adapter, language_server) in local.language_servers_for_buffer(buffer, cx) {
                    if let LanguageServerToQuery::Other(id) = server
                        && language_server.server_id() != id

View on GitHub (pinned to 9d272b0363)

Solutions

  1. Inspect the inner error `err` chained in the message for the actual cause
  2. Check that the buffer's language and server capabilities support the request
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at crates/project/src/lsp_store.rs:5669 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20). Data as JSON: /api/errors/eecbce94f294ba2e. Report an issue: GitHub.