Skip to content

Commit

Permalink
chore(pkg/driver): improved error message when err is nil.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Nov 29, 2023
1 parent 077b671 commit 610e851
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/driver/distro/distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,10 @@ func Download(ctx context.Context,
if err != nil || resp.StatusCode != 200 {
if err == nil {
_ = resp.Body.Close()
printer.Logger.Warn("Non-200 response from url.", printer.Logger.Args("code", resp.StatusCode))
} else {
printer.Logger.Warn("Error GETting url.", printer.Logger.Args("err", err))
}
printer.Logger.Warn("Error GETting url.", printer.Logger.Args("err", err))
continue
}
return destination, copyDataToLocalPath(destination, resp.Body)
Expand Down

0 comments on commit 610e851

Please sign in to comment.