use AddError everywhere (#2372)
This commit is contained in:
committed by
Daniel Nelson
parent
06199523ac
commit
5ebe43f86f
@@ -104,9 +104,7 @@ func (r *Riak) Gather(acc telegraf.Accumulator) error {
|
||||
|
||||
// Range over all servers, gathering stats. Returns early in case of any error.
|
||||
for _, s := range r.Servers {
|
||||
if err := r.gatherServer(s, acc); err != nil {
|
||||
return err
|
||||
}
|
||||
acc.AddError(r.gatherServer(s, acc))
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user