Skip to content

Commit

Permalink
Fix unwrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
smira committed Aug 7, 2019
1 parent 836bc34 commit eb1b70a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions http/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ func (downloader *downloaderImpl) Download(ctx context.Context, url string, dest
}

func retryableError(err error) bool {
// unwrap errors.Wrap
err = errors.Cause(err)

// unwrap *url.Error
if wrapped, ok := err.(*url.Error); ok {
err = wrapped.Err
Expand Down

0 comments on commit eb1b70a

Please sign in to comment.