astral-sh/ruff · error · ruff_server::server::api::Error

-32603

-32603

Error message

Cannot execute the '{}' command: the client does not support `workspace/applyEdit`

What it means

Error "Cannot execute the '{}' command: the client does not support `workspace/applyEdit`" thrown in astral-sh/ruff.

Source

Thrown at crates/ruff_server/src/server/api/requests/execute_command.rs:70

                .arguments
                .unwrap_or_default()
                .into_iter()
                .next()
                .map_or_else(
                    || Ok(DebugCommandArgument::default()),
                    |value| {
                        serde_json::from_value(value).with_failure_code(ErrorCode::InvalidParams)
                    },
                )?;
            return Ok(Some(serde_json::Value::String(
                debug_information(session, argument.text_document)
                    .with_failure_code(ErrorCode::InternalError)?,
            )));
        }

        // check if we can apply a workspace edit
        if !session.resolved_client_capabilities().apply_edit {
            return Err(anyhow::anyhow!(
                "Cannot execute the '{}' command: \
                the client does not support `workspace/applyEdit`",
                command.label()
            ))
            .with_failure_code(ErrorCode::InternalError);
        }

        let mut arguments: Vec<Argument> = params
            .arguments
            .unwrap_or_default()
            .into_iter()
            .map(|value| serde_json::from_value(value).with_failure_code(ErrorCode::InvalidParams))
            .collect::<server::Result<_>>()?;

        arguments.sort_by(|a, b| a.uri.cmp(&b.uri));
        arguments.dedup_by(|a, b| a.uri == b.uri);

        let mut edit_tracker = WorkspaceEditTracker::new(session.resolved_client_capabilities());

View on GitHub (pinned to 672bb4edf0)

When it happens

Trigger: Thrown at crates/ruff_server/src/server/api/requests/execute_command.rs:70 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of astral-sh/ruff@672bb4edf0 (2026-08-16). Data as JSON: /api/errors/806ab62e8ad9fda0. Report an issue: GitHub.