diff --git a/cmd/preflight/cli/upload_results.go b/cmd/preflight/cli/upload_results.go index 10ab3d5e1..bca88e0d3 100644 --- a/cmd/preflight/cli/upload_results.go +++ b/cmd/preflight/cli/upload_results.go @@ -52,10 +52,14 @@ func tryUploadResults(uri string, preflightName string, analyzeResults []*analyz req.Header.Set("Content-Type", "application/json") client := http.DefaultClient - _, err = client.Do(req) + resp, err := client.Do(req) if err != nil { return err } + if resp.StatusCode > 290 { + return err + } + return nil }