{
  "id": "nextjs/server-action-formdata-parse-error",
  "signature": "Error: Server Action failed to parse FormData: missing field 'email'",
  "signature_zh": "错误：服务器操作解析 FormData 失败：缺少字段 'email'",
  "regex": "Error: Server Action failed to parse FormData: missing field '([^']+)'",
  "domain": "nextjs",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "A Server Action expects a specific field in the FormData from a client form submission, but the field is missing, often due to a mismatch between the form's input names and the action's expected keys.",
  "root_cause_type": "generic",
  "root_cause_zh": "服务器操作期望客户端表单提交的 FormData 中包含特定字段，但该字段缺失，通常是由于表单的输入名称与操作期望的键不匹配。",
  "versions": [
    {
      "version": "Next.js 14.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Next.js 14.2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Next.js 15.0.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "If the field is truly missing from the form structure (e.g., typo in name), a hidden input can fix it, but if the issue is on the server side (wrong key), it doesn't help.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "useFormState doesn't affect FormData parsing; the error is in the action itself, not the state hook.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error is about server-side parsing; client component wrapper doesn't change the FormData structure.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check the form input names: ensure they match the keys expected in the Server Action. For example, if the action expects 'email', the form should have '<input name=\"email\" />'.",
      "success_rate": 0.95,
      "how": "Check the form input names: ensure they match the keys expected in the Server Action. For example, if the action expects 'email', the form should have '<input name=\"email\" />'.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Log the entire FormData in the Server Action using 'console.log(Object.fromEntries(formData))' to see all received fields.",
      "success_rate": 0.9,
      "how": "Log the entire FormData in the Server Action using 'console.log(Object.fromEntries(formData))' to see all received fields.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use optional chaining or default values in the action: 'const email = formData.get(\"email\") || \"\"' to avoid missing field errors.",
      "success_rate": 0.85,
      "how": "Use optional chaining or default values in the action: 'const email = formData.get(\"email\") || \"\"' to avoid missing field errors.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Check the form input names: ensure they match the keys expected in the Server Action. For example, if the action expects 'email', the form should have '<input name=\"email\" />'.",
    "Log the entire FormData in the Server Action using 'console.log(Object.fromEntries(formData))' to see all received fields.",
    "Use optional chaining or default values in the action: 'const email = formData.get(\"email\") || \"\"' to avoid missing field errors."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations#formdata",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2024-02-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}