Claude Code Claude Opus 4.6 commited on
Commit ·
2dc23e5
1
Parent(s): fe057ec
Claude Code: Verify health endpoint - add debug logging
Browse filesInvestigation findings:
- Uvicorn correctly binds to 0.0.0.0:7860 via entrypoint.sh
- /health endpoint already has protection against "error": "unknown"
- Status files have correct values (error=null, health=HEALTHY)
- No code currently sets error to "unknown"
Added debug logging to health endpoint to help diagnose
"Error: unknown" display issue if it persists.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -258,6 +258,9 @@ def health_check():
|
|
| 258 |
if error and isinstance(error, str) and error.strip() and error.strip().lower() not in ("unknown", "none", "null"):
|
| 259 |
response["error"] = error
|
| 260 |
|
|
|
|
|
|
|
|
|
|
| 261 |
return JSONResponse(response, status_code=200)
|
| 262 |
|
| 263 |
@app.get("/agents")
|
|
|
|
| 258 |
if error and isinstance(error, str) and error.strip() and error.strip().lower() not in ("unknown", "none", "null"):
|
| 259 |
response["error"] = error
|
| 260 |
|
| 261 |
+
# DEBUG: Log health check response for troubleshooting
|
| 262 |
+
logger.debug(f"[HEALTH] Returning: status={response['status']}, stage={response['stage']}, error={response.get('error', 'none')}")
|
| 263 |
+
|
| 264 |
return JSONResponse(response, status_code=200)
|
| 265 |
|
| 266 |
@app.get("/agents")
|