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) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 21:52:24 +01:00
parent 0dc3065979
commit b3dce188e1
+4
View File
@@ -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"`
}