mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if resp.StatusCode != 200 {
|
||||||
|
return fmt.Errorf("%v: %v", s.url, resp.Status)
|
||||||
|
}
|
||||||
if len(data) == 0 {
|
if len(data) == 0 {
|
||||||
return fmt.Errorf("zero-length data received from %v", s.url)
|
return fmt.Errorf("zero-length data received from %v", s.url)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user