diff --git a/go.mod b/go.mod index 3cffdff5..95070770 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/gomods/athens +go 1.12 + require ( cloud.google.com/go v0.26.0 contrib.go.opencensus.io/exporter/stackdriver v0.6.0 diff --git a/pkg/download/upstream_lister.go b/pkg/download/upstream_lister.go index cb85ded1..23f7e13b 100644 --- a/pkg/download/upstream_lister.go +++ b/pkg/download/upstream_lister.go @@ -66,7 +66,14 @@ func (l *vcsLister) List(ctx context.Context, mod string) (*storage.RevInfo, []s err = cmd.Run() if err != nil { err = fmt.Errorf("%v: %s", err, stderr) - return nil, nil, errors.E(op, err) + // as of now, we can't recognize between a true NotFound + // and an unexpected error, so we choose the more + // hopeful path of NotFound. This way the Go command + // will not log en error and we still get to log + // what happened here if someone wants to dig in more. + // Once, https://github.com/golang/go/issues/30134 is + // resolved, we can hopefully differentiate. + return nil, nil, errors.E(op, err, errors.KindNotFound) } var lr listResp