{"record":{"id":"095ae1333e4f22aa","repo":"zed-industries/zed","slug":"error-message","errorCode":null,"errorMessage":"{error.message}","messagePattern":"\\{error\\.message\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/context_server/src/client.rs","lineNumber":456,"sourceCode":"        let mut cancel_fut = pin!(\n            match cancel_rx {\n                Some(rx) => future::Either::Left(async {\n                    rx.await.log_err();\n                }),\n                None => future::Either::Right(future::pending()),\n            }\n            .fuse()\n        );\n\n        select! {\n            response = rx.fuse() => {\n                let elapsed = started.elapsed();\n                log::trace!(\"took {elapsed:?} to receive response to {method:?} id {id}\");\n                match response {\n                    Ok(response) => {\n                        let parsed: AnyResponse = serde_json::from_str(&response)?;\n                        if let Some(error) = parsed.error {\n                            Err(anyhow!(error.message))\n                        } else if let Some(result) = parsed.result {\n                            Ok(serde_json::from_str(result.get())?)\n                        } else {\n                            anyhow::bail!(\"Invalid response: no result or error\");\n                        }\n                    }\n                    Err(_canceled) => {\n                        if let Some(err) = self.last_transport_error.lock().take() {\n                            return Err(err);\n                        }\n                        anyhow::bail!(\"cancelled\")\n                    }\n                }\n            }\n            _ = cancel_fut => {\n                self.notify(\n                    Cancelled::METHOD,\n                    ClientNotification::Cancelled(CancelledParams {","sourceCodeStart":438,"sourceCodeEnd":474,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/context_server/src/client.rs#L438-L474","documentation":"request_with received a JSON-RPC error response from the context (MCP) server; the message is the error message supplied by the server itself. It means the server processed the request and explicitly returned an error — the wrapped {error.message} is authoritative.","triggerScenarios":"Thrown at crates/context_server/src/client.rs:456 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the server's error message and code to identify the server-side failure","Verify request parameters match the server's expectations","Restart or reconfigure the context server if the error persists"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}