diff --git a/mcp-server/observer.ts b/mcp-server/observer.ts index 1150af1..9984fb5 100644 --- a/mcp-server/observer.ts +++ b/mcp-server/observer.ts @@ -642,7 +642,7 @@ async function main() { console.error(`[observer] started — cycle=${CYCLE_SECS}s, gateway=${GATEWAY}, port=${OBSERVER_PORT}`); // Run a health check first - const health = await fetch(`${GATEWAY}/health`).then(r => r.json()).catch(() => null); + const health = await fetch(`${GATEWAY}/health`).then(r => r.ok ? r.text() : null).catch(() => null); if (!health) { console.error("[observer] gateway unreachable — exiting"); process.exit(1);