mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
avoid dumping error pages into error messages
This commit is contained in:
parent
c61bc58683
commit
5ec748dc5e
@ -62,6 +62,9 @@ func (s *SourceURL) extractFromURL() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if resp.StatusCode != 200 {
|
||||
return fmt.Errorf("%v: %v", s.url, resp.Status)
|
||||
}
|
||||
if len(data) == 0 {
|
||||
return fmt.Errorf("zero-length data received from %v", s.url)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user