Skip to content

Commit

Permalink
Make error numbers sequential
Browse files Browse the repository at this point in the history
  • Loading branch information
skubakdj committed Sep 13, 2023
1 parent faed1cd commit 4d989a0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions core/services/chainlink/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,24 +129,24 @@ func (s *Secrets) SetFrom(f *Secrets) (err error) {
err = multierr.Append(err, config.NamedMultiErrorList(err1, "Database"))
}

if err3 := s.Password.SetFrom(&f.Password); err3 != nil {
err = multierr.Append(err, config.NamedMultiErrorList(err3, "Password"))
if err2 := s.Password.SetFrom(&f.Password); err2 != nil {
err = multierr.Append(err, config.NamedMultiErrorList(err2, "Password"))
}

if err4 := s.Pyroscope.SetFrom(&f.Pyroscope); err4 != nil {
err = multierr.Append(err, config.NamedMultiErrorList(err4, "Pyroscope"))
if err3 := s.Pyroscope.SetFrom(&f.Pyroscope); err3 != nil {
err = multierr.Append(err, config.NamedMultiErrorList(err3, "Pyroscope"))
}

if err5 := s.Prometheus.SetFrom(&f.Prometheus); err5 != nil {
err = multierr.Append(err, config.NamedMultiErrorList(err5, "Prometheus"))
if err4 := s.Prometheus.SetFrom(&f.Prometheus); err4 != nil {
err = multierr.Append(err, config.NamedMultiErrorList(err4, "Prometheus"))
}

if err6 := s.Mercury.SetFrom(&f.Mercury); err6 != nil {
err = multierr.Append(err, config.NamedMultiErrorList(err6, "Mercury"))
if err5 := s.Mercury.SetFrom(&f.Mercury); err5 != nil {
err = multierr.Append(err, config.NamedMultiErrorList(err5, "Mercury"))
}

if err7 := s.Threshold.SetFrom(&f.Threshold); err7 != nil {
err = multierr.Append(err, config.NamedMultiErrorList(err7, "Threshold"))
if err6 := s.Threshold.SetFrom(&f.Threshold); err6 != nil {
err = multierr.Append(err, config.NamedMultiErrorList(err6, "Threshold"))
}

_, err = utils.MultiErrorList(err)
Expand Down

0 comments on commit 4d989a0

Please sign in to comment.