From 1a6a89d14828fa8dd4343ee747c8839831f5ca2e Mon Sep 17 00:00:00 2001 From: evan19kp Date: Thu, 1 Oct 2026 17:14:56 -0700 Subject: [PATCH] fix: all status codes < 200 and > 299 fail --- internal/cli/client/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/cli/client/client.go b/internal/cli/client/client.go index bee55699..4d0712a1 100644 --- a/internal/cli/client/client.go +++ b/internal/cli/client/client.go @@ -32,9 +32,10 @@ func SendRequestAndReadResponse(url *url.URL, enableAuth bool, method string, bo if err != nil { return nil, fmt.Errorf("failed to read response body: %w", err) } - if res.StatusCode != http.StatusOK { + if res.StatusCode < 200 || res.StatusCode > 299 { return data, fmt.Errorf("HTTP %s", res.Status) } + return data, nil }