{"record":{"id":"c7ff1be2aa9776fa","repo":"rohitg00/ai-engineering-from-scratch","slug":"invalid-response-correlation","errorCode":null,"errorMessage":"invalid response correlation","messagePattern":"invalid response correlation","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"certifications/claude/lessons/11-mcp-server-design-and-integration/code/main.py","lineNumber":525,"sourceCode":"            \"id\": self.next_id,\n            \"method\": method,\n            \"params\": {**request_params, \"_meta\": metadata},\n        }\n        self.next_id += 1\n        return request\n\n    def send(\n        self,\n        method: str,\n        params: dict[str, Any] | None = None,\n        *,\n        server: MCPServer | None = None,\n    ) -> tuple[dict[str, Any], dict[str, Any]]:\n        request = self.build_request(method, params)\n        response, notifications = (server or self.server).exchange(request)\n        self.notifications.extend(notifications)\n        if response is None or response.get(\"id\") != request[\"id\"]:\n            raise RuntimeError(\"invalid response correlation\")\n        if \"error\" in response:\n            raise RuntimeError(json.dumps(response[\"error\"], sort_keys=True))\n        return request, response[\"result\"]\n\n    def request(\n        self,\n        method: str,\n        params: dict[str, Any] | None = None,\n        *,\n        server: MCPServer | None = None,\n    ) -> dict[str, Any]:\n        _request, result = self.send(method, params, server=server)\n        return result\n\n    def call_with_mrtr(\n        self,\n        params: dict[str, Any],\n        *,","sourceCodeStart":507,"sourceCodeEnd":543,"githubUrl":"https://github.com/rohitg00/ai-engineering-from-scratch/blob/39ea8a1c6d0b61f071226eff7ede4d4105fed820/certifications/claude/lessons/11-mcp-server-design-and-integration/code/main.py#L507-L543","documentation":"Error \"invalid response correlation\" thrown in rohitg00/ai-engineering-from-scratch.","triggerScenarios":"Thrown at certifications/claude/lessons/11-mcp-server-design-and-integration/code/main.py:525 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"39ea8a1c6d0b61f071226eff7ede4d4105fed820","analyzedAt":"2026-08-26T03:13:46.626Z","schemaVersion":2},"datasetVersion":"2026-08-26T07:17:17.940Z"}