{"record":{"id":"78782898cab25ed6","repo":"zed-industries/zed","slug":"show-document-request-for-was-not-handled-successfully","errorCode":null,"errorMessage":"show document request for {} was not handled successfully","messagePattern":"show document request for (.+?) was not handled successfully","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/project/src/project.rs","lineNumber":5687,"sourceCode":"        );\n        let uri = lsp::Uri::from_str(&payload.uri)\n            .with_context(|| format!(\"parsing show document uri {}\", payload.uri))?;\n        let (tx, rx) = async_channel::bounded(1);\n        project.update(&mut cx, |_, cx| {\n            cx.emit(Event::LanguageServerShowDocument(\n                LanguageServerShowDocumentRequest {\n                    uri,\n                    external: payload.external,\n                    take_focus: payload.take_focus,\n                    selection,\n                    response_channel: tx,\n                },\n            ));\n        });\n        drop(project);\n\n        let success = rx.recv().await.unwrap_or(false);\n        anyhow::ensure!(\n            success,\n            \"show document request for {} was not handled successfully\",\n            payload.uri\n        );\n        Ok(proto::Ack {})\n    }\n\n    async fn handle_hide_toast(\n        this: Entity<Self>,\n        envelope: TypedEnvelope<proto::HideToast>,\n        mut cx: AsyncApp,\n    ) -> Result<()> {\n        this.update(&mut cx, |_, cx| {\n            cx.emit(Event::HideToast {\n                notification_id: envelope.payload.notification_id.into(),\n            });\n            Ok(())\n        })","sourceCodeStart":5669,"sourceCodeEnd":5705,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/project/src/project.rs#L5669-L5705","documentation":"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.","triggerScenarios":"Thrown at crates/project/src/project.rs:5687 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-09-12T19:35:53.743Z","contentChangedAt":"2026-09-12T19:35:53.743Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}