{"record":{"id":"a9ca2db8f039a01e","repo":"rohitg00/ai-engineering-from-scratch","slug":"32601-a9ca2d","errorCode":"-32601","errorMessage":"Method not found","messagePattern":"Method not found","errorType":"exception","errorClass":"RpcError","httpStatus":null,"severity":"error","filePath":"phases/13-tools-and-protocols/10-mcp-resources-and-prompts/code/main.py","lineNumber":267,"sourceCode":"    if not isinstance(params, dict):\n        if is_notification:\n            return None\n        error = RpcError(-32602, \"params must be an object\")\n        return {\"jsonrpc\": \"2.0\", \"id\": request_id, \"error\": error.as_json()}\n    try:\n        validate_request_meta(params)\n        if is_notification:\n            handler = HANDLERS.get(method)\n            if handler is not None:\n                handler(params)\n            return None\n        if method == \"subscriptions/listen\":\n            if request_id is None:\n                raise RpcError(-32602, \"subscriptions/listen requires a request id\")\n            return subscriptions_listen(request_id, params)\n        handler = HANDLERS.get(method)\n        if handler is None:\n            raise RpcError(-32601, \"Method not found\", {\"method\": method})\n        return {\"jsonrpc\": \"2.0\", \"id\": request_id, \"result\": handler(params)}\n    except RpcError as exc:\n        if is_notification:\n            return None\n        return {\"jsonrpc\": \"2.0\", \"id\": request_id, \"error\": exc.as_json()}\n\n\ndef rpc_request(request_id: int, method: str, **params: Any) -> dict[str, Any]:\n    return {\n        \"jsonrpc\": \"2.0\",\n        \"id\": request_id,\n        \"method\": method,\n        \"params\": {**params, \"_meta\": request_meta()},\n    }\n\n\ndef demo() -> list[dict[str, Any]]:\n    transcript: list[dict[str, Any]] = []","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/rohitg00/ai-engineering-from-scratch/blob/39ea8a1c6d0b61f071226eff7ede4d4105fed820/phases/13-tools-and-protocols/10-mcp-resources-and-prompts/code/main.py#L249-L285","documentation":"Error \"Method not found\" thrown in rohitg00/ai-engineering-from-scratch.","triggerScenarios":"Thrown at phases/13-tools-and-protocols/10-mcp-resources-and-prompts/code/main.py:267 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"}