diff --git a/server/upstream/domains.go b/server/upstream/domains.go index a80429a..de37399 100644 --- a/server/upstream/domains.go +++ b/server/upstream/domains.go @@ -41,7 +41,13 @@ func (o *Options) CheckCanonicalDomain(giteaClient *gitea.Client, actualDomain, } // Only log the error on the last iteration. - if i == 2 { + if i != 2 { + continue + } + + if err != gitea.ErrorNotFound { + log.Error().Err(err).Msgf("could not read %s of %s/%s", canonicalDomainConfig, o.TargetOwner, o.TargetRepo) + } else { log.Info().Err(err).Msgf("could not read %s of %s/%s", canonicalDomainConfig, o.TargetOwner, o.TargetRepo) } }