fix: improve error handling in multi-modal RL health endpoint
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Successful in 3s
Deploy to Testnet / deploy-testnet (push) Successful in 1m17s
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled

Added better error handling for AI service unavailability.
Returns degraded status with informative note when AI service
is not running on the node.
This commit is contained in:
aitbc
2026-05-03 23:11:21 +02:00
parent 3b09e6b5c5
commit 70b1a9a83f

View File

@@ -125,5 +125,13 @@ async def health() -> dict[str, Any]:
return {
"status": "degraded",
"router": "multi-modal-rl",
"ai_service": "unreachable"
"ai_service": "unreachable",
"note": "AI service not available on this node"
}
except Exception:
return {
"status": "degraded",
"router": "multi-modal-rl",
"ai_service": "error",
"note": "AI service check failed"
}