We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f5f063 commit ecc92b1Copy full SHA for ecc92b1
pkg/supportbundle/load.go
@@ -252,6 +252,14 @@ func loadSpecFromURL(arg string) ([]byte, error) {
252
}
253
return nil, errors.Wrap(err, "execute request")
254
255
+
256
+ // handle non 2xx http statuses
257
+ // redirects appear to already be handled by the go http client
258
+ // TODO: handle potential for redirect loops breaking this?
259
+ if resp.StatusCode != 200 {
260
+ return nil, errors.New("request returned non 200 response")
261
+ }
262
263
defer resp.Body.Close()
264
265
body, err := io.ReadAll(resp.Body)
0 commit comments