{"record":{"id":"f9a110f50cf2c92b","repo":"BerriAI/litellm","slug":"not-found","errorCode":null,"errorMessage":"Not Found","messagePattern":"Not Found","errorType":"http","errorClass":"HTTPException","httpStatus":404,"severity":"error","filePath":"litellm/proxy/health_endpoints/_health_endpoints.py","lineNumber":1714,"sourceCode":"    from service) and blocks until the in-flight request counter drains to\n    zero or ``GRACEFUL_SHUTDOWN_TIMEOUT`` elapses. Unlike a fixed ``sleep``,\n    this returns as soon as real in-flight work is done.\n\n    Wire it up as:\n\n    ```yaml\n    lifecycle:\n      preStop:\n        httpGet:\n          path: /health/drain\n          port: 4000\n          httpHeaders:\n            - name: X-Drain-Token\n              value: <same value as drain_endpoint_token>\n    ```\n    \"\"\"\n    if not _drain_endpoint_enabled():\n        raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=\"Not Found\")\n    _authorize_drain_request(request)\n    GracefulShutdownManager.start_shutdown()\n    drained: Final = await GracefulShutdownManager.wait_for_drain(exclude_self=True)\n    return {\"status\": \"drained\", \"drained_requests\": drained}\n\n\n@router.get(\n    \"/health/liveliness\",  # Historical LiteLLM name; doesn't match k8s terminology but kept for backwards compatibility\n    tags=[\"health\"],\n)\n@router.get(\n    \"/health/liveness\",  # Kubernetes has \"liveness\" probes (https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command)\n    tags=[\"health\"],\n)\nasync def health_liveliness(response: Response):\n    \"\"\"\n    Unprotected endpoint for checking if worker is alive.\n","sourceCodeStart":1696,"sourceCodeEnd":1732,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/health_endpoints/_health_endpoints.py#L1696-L1732","documentation":"Error \"Not Found\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/proxy/health_endpoints/_health_endpoints.py:1714 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the requested health endpoint path and resource identifier.","Check that the resource exists (e.g. correct model or key alias)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}