From 751d59858cc532a7fc932c183d2442cb4e25bf93 Mon Sep 17 00:00:00 2001 From: superset-home <338338640+superset-home@users.noreply.github.com> Date: Tue, 27 Oct 2026 17:04:42 +0000 Subject: [PATCH] fix(host-service): classify a vanished local address as the cloud being unreachable A TLS read to the cloud API fails with EADDRNOTAVAIL when the interface the socket was bound to loses its address (Wi-Fi change, sleep/wake, VPN toggle). That is the host's network, not host-service, but the code was missing from UNREACHABLE_CODES, so host.info reported it as a 500. Refs HOST-SERVICE-A2 --- .../host-service/src/trpc/router/host/cloud-api-error.test.ts | 1 + packages/host-service/src/trpc/router/host/cloud-api-error.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/host-service/src/trpc/router/host/cloud-api-error.test.ts b/packages/host-service/src/trpc/router/host/cloud-api-error.test.ts index e9fc1907303..d069e1bb7ce 100644 --- a/packages/host-service/src/trpc/router/host/cloud-api-error.test.ts +++ b/packages/host-service/src/trpc/router/host/cloud-api-error.test.ts @@ -67,6 +67,7 @@ describe("rethrowCloudUnreachable", () => { ["ECONNREFUSED", "connect ECONNREFUSED 10.0.0.1:443"], ["ECONNRESET", "read ECONNRESET"], ["ENOTCONN", "read ENOTCONN"], + ["EADDRNOTAVAIL", "read EADDRNOTAVAIL"], ["ENOTFOUND", "getaddrinfo ENOTFOUND api.example.invalid"], ["EAI_AGAIN", "getaddrinfo EAI_AGAIN api.example.invalid"], ["EHOSTUNREACH", "connect EHOSTUNREACH 10.0.0.1:443"], diff --git a/packages/host-service/src/trpc/router/host/cloud-api-error.ts b/packages/host-service/src/trpc/router/host/cloud-api-error.ts index d05689b2502..fbc10d400f0 100644 --- a/packages/host-service/src/trpc/router/host/cloud-api-error.ts +++ b/packages/host-service/src/trpc/router/host/cloud-api-error.ts @@ -18,6 +18,7 @@ const UNREACHABLE_CODES = new Set([ "ECONNREFUSED", "ECONNRESET", "ENOTCONN", + "EADDRNOTAVAIL", "ETIMEDOUT", "ENOTFOUND", "EAI_AGAIN",