diff --git a/internal/download/fetch.go b/internal/download/fetch.go index 41d9b72a..4874da22 100644 --- a/internal/download/fetch.go +++ b/internal/download/fetch.go @@ -41,6 +41,9 @@ func (HTTPFetcher) Get(uri string) (io.ReadCloser, error) { if err != nil { return nil, errors.Wrapf(err, "failed to download %q", uri) } + if resp.StatusCode >= 400 { + return nil, errors.Errorf("failed to download %q, status code %d", uri, resp.StatusCode) + } return resp.Body, nil }