From b3dce188e1c625cfedbdf205b345532d069392f8 Mon Sep 17 00:00:00 2001 From: Steve Cliff Date: Thu, 2 Apr 2026 21:52:24 +0100 Subject: [PATCH] Fix version check failing on non-200 status responses When the engine returns 401 (auth required) or other non-200 responses, the version check was parsing the error body, getting an empty version string, and fatally exiting. Now skips the check on non-200 responses and lets the actual API call surface the real error. Co-Authored-By: Claude Opus 4.6 (1M context) --- client/internal/api/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/internal/api/client.go b/client/internal/api/client.go index 38972c6..e6e0eee 100644 --- a/client/internal/api/client.go +++ b/client/internal/api/client.go @@ -94,6 +94,10 @@ func (c *Client) checkEngineVersion() { } defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + return // auth error or other issue — let the actual request surface it + } + var status struct { Version string `json:"version"` }