From ec769d39cb892df7bb91e7ff03d7c67f8bbd7a63 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 17 Feb 2026 18:32:22 +0000 Subject: [PATCH] docs: explain swallowed JSON parse error in relay-health.mjs Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- src/relay-health.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/relay-health.mjs b/src/relay-health.mjs index e8b2fac..67c4943 100644 --- a/src/relay-health.mjs +++ b/src/relay-health.mjs @@ -138,6 +138,8 @@ async function probePublishRead(relayUrl, namespace, timeoutMs) { try { message = JSON.parse(raw.toString()); } catch { + // Ignore malformed messages. The relay might be sending non-JSON data + // or we might have a protocol mismatch. We only care about valid JSON. return; } if (!Array.isArray(message) || message.length < 2) return;