zed-industries/zed · error
show document request for {} was not handled successfully
Error message
show document request for {} was not handled successfully What it means
ensure! check after awaiting the response channel of Event::LanguageServerShowDocument: the showDocument request emitted to the project handlers resolved to false (or the channel closed, mapped to false via unwrap_or), meaning no editor/window handler opened or focused the requested document within the handler's lifetime. This is the remote-protocol handler returning an Ack failure to the language server.
Source
Thrown at crates/project/src/project.rs:5687
);
let uri = lsp::Uri::from_str(&payload.uri)
.with_context(|| format!("parsing show document uri {}", payload.uri))?;
let (tx, rx) = async_channel::bounded(1);
project.update(&mut cx, |_, cx| {
cx.emit(Event::LanguageServerShowDocument(
LanguageServerShowDocumentRequest {
uri,
external: payload.external,
take_focus: payload.take_focus,
selection,
response_channel: tx,
},
));
});
drop(project);
let success = rx.recv().await.unwrap_or(false);
anyhow::ensure!(
success,
"show document request for {} was not handled successfully",
payload.uri
);
Ok(proto::Ack {})
}
async fn handle_hide_toast(
this: Entity<Self>,
envelope: TypedEnvelope<proto::HideToast>,
mut cx: AsyncApp,
) -> Result<()> {
this.update(&mut cx, |_, cx| {
cx.emit(Event::HideToast {
notification_id: envelope.payload.notification_id.into(),
});
Ok(())
})View on GitHub (pinned to 9d272b0363)
Solutions
- Check that a subscriber of Event::LanguageServerShowDocument actually sends true/false on the response_channel; a missing handler closes the channel and yields false
- Verify the URI is openable in this session (worktree mounted, file exists) before requesting showDocument
- Treat as non-fatal on the server side per the LSP spec; the client may legitimately decline the request
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/project/src/project.rs:5687 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-09-12).
Data as JSON: /api/errors/78782898cab25ed6.
Report an issue: GitHub.