Skip to content

Commit 6407df6

Browse files
committed
Upload error
1 parent 3e76554 commit 6407df6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/preflight/cli/upload_results.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,14 @@ func tryUploadResults(uri string, preflightName string, analyzeResults []*analyz
5252
req.Header.Set("Content-Type", "application/json")
5353

5454
client := http.DefaultClient
55-
_, err = client.Do(req)
55+
resp, err := client.Do(req)
5656
if err != nil {
5757
return err
5858
}
5959

60+
if resp.StatusCode > 290 {
61+
return err
62+
}
63+
6064
return nil
6165
}

0 commit comments

Comments
 (0)