mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 22:06:57 +00:00
Break on not found error
This commit is contained in:
parent
e7e3045601
commit
001e89bb2e
1 changed files with 2 additions and 6 deletions
|
@ -36,7 +36,7 @@ func (o *Options) CheckCanonicalDomain(giteaClient *gitea.Client, actualDomain,
|
|||
// Do at least three attempts before bailing out.
|
||||
for i := 0; i < 3; i++ {
|
||||
body, err = giteaClient.GiteaRawContent(o.TargetOwner, o.TargetRepo, o.TargetBranch, canonicalDomainConfig)
|
||||
if err == nil {
|
||||
if err == nil || err == gitea.ErrorNotFound {
|
||||
break
|
||||
}
|
||||
|
||||
|
@ -45,11 +45,7 @@ func (o *Options) CheckCanonicalDomain(giteaClient *gitea.Client, actualDomain,
|
|||
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)
|
||||
}
|
||||
log.Info().Err(err).Msgf("could not read %s of %s/%s", canonicalDomainConfig, o.TargetOwner, o.TargetRepo)
|
||||
}
|
||||
|
||||
var domains []string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue