Merge pull request #1865 from molecula/wrapping-etcd-retry

add wrapping to differentiate etcd errors
This commit is contained in:
Matthew Jaffee 2022-01-14 15:58:56 -06:00 committed by GitHub
commit 34c64fbaba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -227,12 +227,12 @@ func (e *Etcd) retryClient(fn func(cli *clientv3.Client) error) (err error) {
break
default:
// nil, or an error we don't know about
return err
return errors.Wrap(err, "non-retryable error")
}
}
// if we got here, we got a total of three of some combination of
// ErrTimeout or ErrLeaderChanged, and we're giving up.
return err
return errors.Wrap(err, "exhausted all retries")
}
func parseOptions(opt Options) *embed.Config {