{
  "id": "go/grpc-protobuf-required-field-missing",
  "signature": "error: proto: required field \"user_id\" not set",
  "signature_zh": "错误：proto：必填字段\"user_id\"未设置",
  "regex": "error:\\ proto:\\ required\\ field\\ \"user_id\"\\ not\\ set",
  "domain": "go",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "A protobuf message with required fields (proto2 syntax) is missing a required field during unmarshaling.",
  "root_cause_type": "generic",
  "root_cause_zh": "具有必填字段（proto2语法）的protobuf消息在反序列化时缺少必填字段。",
  "versions": [
    {
      "version": "1.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Make the field optional in proto2 without changing schema.",
      "why_fails": "Required is a proto2 concept; cannot be removed without schema change.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Set a default value for the field.",
      "why_fails": "Required fields must be explicitly set by sender.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Migrate from proto2 to proto3 where all fields are optional.",
      "success_rate": 0.9,
      "how": "syntax = \"proto3\";\nmessage UserRequest { string user_id = 1; }",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure sender populates all required fields before sending.",
      "success_rate": 0.85,
      "how": "if msg.UserId == nil { return errors.New(\"user_id required\") }",
      "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.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-11-01",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}