{
  "id": "nextjs/edge-runtime-fetch-abort",
  "signature": "Error: The operation was aborted. (Edge Runtime: fetch aborted due to timeout or cancellation)",
  "signature_zh": "错误：操作已中止。（边缘运行时：由于超时或取消而中止的 fetch）",
  "regex": "The operation was aborted",
  "domain": "nextjs",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "In the Edge Runtime (e.g., middleware, edge API routes), fetch requests have a default timeout of 30 seconds and can be aborted by the runtime if the response is too slow or if the client disconnects.",
  "root_cause_type": "generic",
  "root_cause_zh": "在边缘运行时（例如中间件、边缘 API 路由）中，fetch 请求默认超时为 30 秒，如果响应太慢或客户端断开连接，运行时可能会中止请求。",
  "versions": [
    {
      "version": "Next.js 13.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Next.js 14.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Next.js 15.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Edge Runtime (Vercel)",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The Edge Runtime has a hard limit of 30 seconds for fetch; this cannot be overridden. The config option may not exist or be ignored in edge.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The runtime will still abort at 30 seconds even if the AbortController signal is set to a longer timeout.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "If the route is already on edge, the runtime is fixed; moving to Node.js may require other changes (e.g., removing edge-specific APIs).",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Optimize the external API response time (e.g., use caching, reduce payload size) to ensure it completes within 30 seconds. Alternatively, use a server-side data fetching pattern with incremental static regeneration (ISR) to avoid real-time fetch.",
      "success_rate": 0.8,
      "how": "Optimize the external API response time (e.g., use caching, reduce payload size) to ensure it completes within 30 seconds. Alternatively, use a server-side data fetching pattern with incremental static regeneration (ISR) to avoid real-time fetch.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Move the fetch to a server component (Node.js runtime) where there is no 30-second timeout limit. Use the edge runtime only for lightweight operations.",
      "success_rate": 0.9,
      "how": "Move the fetch to a server component (Node.js runtime) where there is no 30-second timeout limit. Use the edge runtime only for lightweight operations.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Optimize the external API response time (e.g., use caching, reduce payload size) to ensure it completes within 30 seconds. Alternatively, use a server-side data fetching pattern with incremental static regeneration (ISR) to avoid real-time fetch.",
    "Move the fetch to a server component (Node.js runtime) where there is no 30-second timeout limit. Use the edge runtime only for lightweight operations."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nextjs.org/docs/app/api-reference/edge",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}