{
  "id": "go/net-http-response-body-not-closed",
  "signature": "error: http: read on closed response body",
  "signature_zh": "错误：http：在已关闭的响应体上读取",
  "regex": "error:\\ http:\\ read\\ on\\ closed\\ response\\ body",
  "domain": "go",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "Reading from an HTTP response body that has already been closed, often due to premature close or double close.",
  "root_cause_type": "generic",
  "root_cause_zh": "从已关闭的HTTP响应体中读取，通常由于过早关闭或重复关闭。",
  "versions": [
    {
      "version": "1.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.21",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Not closing response body at all",
      "why_fails": "Leads to resource leak and eventually connection pool exhaustion.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Always defer close after checking error",
      "success_rate": 0.95,
      "how": "resp, err := http.Get(url)\nif err != nil { return err }\ndefer resp.Body.Close()\n// read resp.Body",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-20",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}