{"record":{"id":"69eed04f3f36f994","repo":"Kuberwastaken/claurst","slug":"rmcp-list-resources-failed","errorCode":null,"errorMessage":"rmcp list_resources failed: {}","messagePattern":"rmcp list_resources failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-rust/crates/mcp/src/rmcp_backend.rs","lineNumber":534,"sourceCode":"    ) -> anyhow::Result<CallToolResult> {\n        let mut params = rmcp_model::CallToolRequestParams::new(name.to_string());\n        if let Some(arguments) = arguments {\n            params = params.with_arguments(json_value_to_object(arguments)?);\n        }\n        let result = self\n            .peer\n            .call_tool(params)\n            .await\n            .map_err(|e| anyhow::anyhow!(\"rmcp call_tool '{}' failed: {}\", name, e))?;\n        Ok(convert_call_tool_result(result))\n    }\n\n    async fn list_resources(&self) -> anyhow::Result<Vec<McpResource>> {\n        let resources = self\n            .peer\n            .list_all_resources()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"rmcp list_resources failed: {}\", e))?;\n        Ok(resources.into_iter().map(convert_resource).collect())\n    }\n\n    async fn read_resource(&self, uri: &str) -> anyhow::Result<ResourceContents> {\n        let result = self\n            .peer\n            .read_resource(rmcp_model::ReadResourceRequestParams::new(uri.to_string()))\n            .await\n            .map_err(|e| anyhow::anyhow!(\"rmcp read_resource '{}' failed: {}\", uri, e))?;\n        let first = result\n            .contents\n            .into_iter()\n            .next()\n            .ok_or_else(|| anyhow::anyhow!(\"rmcp read_resource '{}' returned no contents\", uri))?;\n        Ok(convert_resource_contents(first))\n    }\n\n    async fn list_prompts(&self) -> anyhow::Result<Vec<McpPrompt>> {","sourceCodeStart":516,"sourceCodeEnd":552,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/mcp/src/rmcp_backend.rs#L516-L552","documentation":"Raised in `RmcpClientBackend::list_resources` when the rmcp peer's `list_all_resources()` future fails during the `resources/list` round-trip. Like the other rmcp peer wrappers, any transport failure or JSON-RPC error response from the MCP server is re-wrapped with a uniform message so the caller sees which backend operation failed. The original rmcp error text follows the colon.","triggerScenarios":"Calling `list_resources` when the server rejects `resources/list`: server lacks the resources capability (JSON-RPC 'method not found'), the session is closed or stale, the transport failed mid-request, or the server errored enumerating its resources.","commonSituations":"Connecting to an MCP server that only exposes tools (very common — many servers skip resources); server restarted between connect and the listing call; legacy SSE endpoint no longer valid; a resource provider on the server side panicking during enumeration.","solutions":["Check the inner error: 'method not found' means the server has no resources capability — treat the list as empty.","Reconnect the MCP session and retry if the transport/session closed.","Verify the server advertises the resources capability in its initialize response.","Check server-side logs if the enumeration itself failed."],"exampleFix":"// before: unconditional listing\nlet resources = backend.list_resources().await?;\n// after: tolerate servers without the resources capability\nlet resources = match backend.list_resources().await {\n    Ok(r) => r,\n    Err(e) if e.to_string().contains(\"method not found\") => Vec::new(),\n    Err(e) => return Err(e),\n};","handlingStrategy":"try-catch","validationCode":"fn server_supports_resources(init_caps: &ServerCapabilities) -> bool {\n    init_caps.resources.is_some()\n}","typeGuard":null,"tryCatchPattern":"match backend.list_resources().await {\n    Ok(resources) => resources,\n    Err(e) if e.to_string().contains(\"method not found\") => Vec::new(),\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Check the resources capability in the initialize response before listing.","Reconnect the backend if the server restarted; stale sessions fail every call.","Treat 'method not found' as an empty capability, not an outage.","Check server logs when enumeration fails despite advertised capability."],"tags":["mcp","jsonrpc","resources","rpc","session"],"backgroundTag":"api-request-failed","analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}