From 70714388e8869eb50f3c2931f279ff8710292f08 Mon Sep 17 00:00:00 2001 From: Lauren ten Hoor Date: Fri, 13 Feb 2026 20:14:55 +0800 Subject: [PATCH] fix: strip non-JSON prefix from gateway status output (#165) --- lib/services/health.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/services/health.ts b/lib/services/health.ts index 45267f3..720079f 100644 --- a/lib/services/health.ts +++ b/lib/services/health.ts @@ -91,7 +91,8 @@ export async function fetchGatewaySessions(): Promise { { timeoutMs: 15_000 }, ); - const data = JSON.parse(result.stdout); + const jsonStart = result.stdout.indexOf("{"); + const data = JSON.parse(jsonStart >= 0 ? result.stdout.slice(jsonStart) : result.stdout); const sessions: GatewaySession[] = data?.sessions?.recent ?? []; for (const session of sessions) {