{
  "id": "go/grpc-already-exists-duplicate",
  "signature": "rpc error: code = AlreadyExists desc = resource already exists: id=123",
  "signature_zh": "rpc 错误：code = AlreadyExists desc = 资源已存在：id=123",
  "regex": "rpc\\ error:\\ code\\ =\\ AlreadyExists\\ desc\\ =\\ resource\\ already\\ exists:\\ id=123",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The client attempted to create a resource that already exists, often due to a duplicate request or race condition.",
  "root_cause_type": "generic",
  "root_cause_zh": "客户端尝试创建已存在的资源，通常是由于重复请求或竞态条件。",
  "versions": [
    {
      "version": "1.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This may violate business logic if the ID is meaningful; also doesn't address the root cause of duplicate requests.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The operation didn't create a new resource, leading to inconsistent state.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "// Client sends a unique idempotency key\n// Server checks if key already processed\nif exists, return existing resource\nelse create new",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "resp, err := client.Create(ctx, req)\nif status.Code(err) == codes.AlreadyExists {\n    // Fetch existing resource\n    getResp, err := client.Get(ctx, &GetRequest{Id: req.Id})\n    // use getResp\n}",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-10-12",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}