rohitg00/ai-engineering-from-scratch · error · RuntimeError

error

Error message

error

What it means

Error "error" thrown in rohitg00/ai-engineering-from-scratch.

Source

Thrown at certifications/claude/lessons/11-mcp-server-design-and-integration/code/main.py:527

            "params": {**request_params, "_meta": metadata},
        }
        self.next_id += 1
        return request

    def send(
        self,
        method: str,
        params: dict[str, Any] | None = None,
        *,
        server: MCPServer | None = None,
    ) -> tuple[dict[str, Any], dict[str, Any]]:
        request = self.build_request(method, params)
        response, notifications = (server or self.server).exchange(request)
        self.notifications.extend(notifications)
        if response is None or response.get("id") != request["id"]:
            raise RuntimeError("invalid response correlation")
        if "error" in response:
            raise RuntimeError(json.dumps(response["error"], sort_keys=True))
        return request, response["result"]

    def request(
        self,
        method: str,
        params: dict[str, Any] | None = None,
        *,
        server: MCPServer | None = None,
    ) -> dict[str, Any]:
        _request, result = self.send(method, params, server=server)
        return result

    def call_with_mrtr(
        self,
        params: dict[str, Any],
        *,
        first_server: MCPServer,
        retry_server: MCPServer,

View on GitHub (pinned to 39ea8a1c6d)

When it happens

Trigger: Thrown at certifications/claude/lessons/11-mcp-server-design-and-integration/code/main.py:527 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of rohitg00/ai-engineering-from-scratch@39ea8a1c6d (2026-08-26). Data as JSON: /api/errors/2be3532407520c95. Report an issue: GitHub.