{
  "id": "python/starlette-streaming-response-generator-error",
  "signature": "RuntimeError: No response returned.",
  "signature_zh": "RuntimeError: 没有返回响应。",
  "regex": "RuntimeError:\\ No\\ response\\ returned\\.",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "A middleware or dependency returns None instead of a Response, or a route forgets to return, so Starlette finds no response to send.",
  "root_cause_type": "generic",
  "root_cause_zh": "中间件或依赖返回 None 而非 Response，或路由忘记 return，导致 Starlette 找不到可发送的响应。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The error is raised at the ASGI layer where the handler may not apply.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Masks the real bug; the route still doesn't produce intended output.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.92,
      "how": "Ensure every code path returns a Response:\nreturn JSONResponse({'ok': True})",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.88,
      "how": "In middleware, always call await call_next(request) and return its result.",
      "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.84,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-09-25",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}