MCPcopy
hub / github.com/lightningpixel/modly / _try_health

Function _try_health

tools/modly-cli/agent.py:166–171  ·  view source on GitHub ↗
(base_url: str, timeout: float)

Source from the content-addressed store, hash-verified

164
165
166def _try_health(base_url: str, timeout: float) -> dict[str, Any] | None:
167 try:
168 health = _request_json("GET", f"{base_url.rstrip('/')}/health", timeout=timeout)
169 except ModlyCliError:
170 return None
171 return health if isinstance(health, dict) else {"raw": health}
172
173
174def _require_health(base_url: str, timeout: float) -> dict[str, Any]:

Callers 1

cmd_ensure_serverFunction · 0.85

Calls 1

_request_jsonFunction · 0.85

Tested by

no test coverage detected