{"record":{"id":"a2271b8c8ed30a2c","repo":"Hmbown/CodeWhale","slug":"reviewed-plugin-mcp-server-returned-an-error-in","errorCode":null,"errorMessage":"Reviewed plugin MCP server returned an error in '{method}' (server details suppressed to protect environment-backed credentials)","messagePattern":"Reviewed plugin MCP server returned an error in '(.+?)' \\(server details suppressed to protect environment-backed credentials\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/mcp.rs","lineNumber":1390,"sourceCode":"    /// The server supplied a spec-shaped `capabilities` object at initialize.\n    Advertised(McpServerCapabilities),\n    /// A connected legacy server omitted metadata, so bounded discovery probes\n    /// remain enabled for backward compatibility.\n    LegacyFallback,\n    /// The server has not completed initialization, so no truthful capability\n    /// claim can be made yet.\n    #[default]\n    NotObserved,\n}\n\nfn response_result<'a>(\n    response: &'a serde_json::Value,\n    method: &str,\n    suppress_server_details: bool,\n) -> Result<Option<&'a serde_json::Value>> {\n    if let Some(error) = response.get(\"error\") {\n        if suppress_server_details {\n            anyhow::bail!(\n                \"Reviewed plugin MCP server returned an error in '{method}' (server details suppressed to protect environment-backed credentials)\"\n            );\n        }\n        anyhow::bail!(\"MCP error in '{method}': {error}\");\n    }\n    Ok(response.get(\"result\"))\n}\n\nasync fn run_optional_discovery<F>(server: &str, method: &str, timeout: Duration, discovery: F)\nwhere\n    F: Future<Output = Result<()>>,\n{\n    match tokio::time::timeout(timeout, discovery).await {\n        Ok(Ok(())) => {}\n        Ok(Err(error)) => {\n            tracing::warn!(\n                target: \"mcp\",\n                server,","sourceCodeStart":1372,"sourceCodeEnd":1408,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/mcp.rs#L1372-L1408","documentation":"When a reviewed plugin's MCP server returns a JSON-RPC error response, the raw error object is normally surfaced as \"MCP error in '<method>': <error>\". For reviewed plugins, suppress_server_details is set so the error body is hidden — its text may echo environment-backed credentials the plugin server can see. This generic message is thrown instead, protecting those secrets.","triggerScenarios":"check_response-style code is called with suppress_server_details=true and the server's JSON-RPC response contains an \"error\" key; thrown for any failed call (tools/list, tools/call, initialize, etc.) against a reviewed-plugin server.","commonSituations":"The plugin tool returned a genuine server-side error (invalid arguments, rate limit, backend outage); the server rejected authentication; the tool output included sensitive text that must not be displayed.","solutions":["Read the plugin's own logs to learn the underlying error, since details are deliberately suppressed here","Fix the tool invocation (arguments, permissions, backend state) that made the plugin server fail","If you fully trust the context, run the same server unreviewed (or adjust the suppression policy) to see raw error details — understanding the credential-exposure tradeoff first"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match client.call_tool(\"tools/call\", args) {\n    Err(e) if e.to_string().contains(\"server details suppressed\") => {\n        log::warn!(\"reviewed plugin server failed for tools/call; details hidden. Check plugin logs.\");\n        // do NOT retry blindly; inspect plugin-side logs for the real cause\n    }\n    other => other?,\n}","preventionTips":["Remember reviewed-plugin errors are intentionally sanitized; diagnose from plugin logs, not the client message","Validate tool arguments against the tool schema before invoking to avoid most server errors","Do not weaken credential suppression just to read an error message"],"tags":["mcp","json-rpc","security","error-suppression"],"backgroundTag":"api-error-response","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}