From 42bdba0810131da273af7416442c94c7f8bb029c Mon Sep 17 00:00:00 2001 From: jarugupj <121142710+jarugupj@users.noreply.github.com> Date: Thu, 28 May 2026 17:18:00 +0000 Subject: [PATCH 1/2] distinguish API down from unreachable in status command When /status returns a non-2xx response the API is reachable but unhealthy, so report it as down rather than reusing the generic 'could not reach' message used for transport errors. --- cmd/status.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/status.go b/cmd/status.go index 4d1ca70..9731363 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -50,7 +50,7 @@ func runStatus(cmd *cobra.Command, args []string) error { defer resp.Body.Close() if resp.StatusCode < 200 || resp.StatusCode >= 300 { - pterm.Error.Println("Could not reach Kernel API. Check https://status.kernel.sh for updates.") + pterm.Error.Println("Kernel API is down. Check https://status.kernel.sh for updates.") return nil } From ad449043eb524ed974b8aad5920fb36057ca3482 Mon Sep 17 00:00:00 2001 From: jarugupj <121142710+jarugupj@users.noreply.github.com> Date: Fri, 29 May 2026 14:10:07 +0000 Subject: [PATCH 2/2] fall back to /health on non-2xx to distinguish API down from /status broken Co-Authored-By: Claude Opus 4.7 --- cmd/status.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/status.go b/cmd/status.go index 9731363..329ae19 100644 --- a/cmd/status.go +++ b/cmd/status.go @@ -50,6 +50,13 @@ func runStatus(cmd *cobra.Command, args []string) error { defer resp.Body.Close() if resp.StatusCode < 200 || resp.StatusCode >= 300 { + if h, err := client.Get(util.GetBaseURL() + "/health"); err == nil { + h.Body.Close() + if h.StatusCode >= 200 && h.StatusCode < 300 { + pterm.Error.Println("Kernel API is responding but /status is unavailable. Check https://status.kernel.sh for updates.") + return nil + } + } pterm.Error.Println("Kernel API is down. Check https://status.kernel.sh for updates.") return nil }