Fix allways analytic push func Failed (#305)

This commit is contained in:
walker-16 2023-05-10 13:15:37 -03:00 committed by GitHub
parent a31d59822d
commit 4ecf5983e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -83,7 +83,10 @@ func (m *Metric) Push(ctx context.Context, vaa *sdk.VAA) error {
err2 := m.volumeMeasurement(ctx, vaa)
//TODO if we had go 1.20, we could just use `errors.Join(err1, err2)` here.
return fmt.Errorf("err1=%w, err2=%w", err1, err2)
if err1 != nil || err2 != nil {
return fmt.Errorf("err1=%w, err2=%w", err1, err2)
}
return nil
}
// Close influx client.