diff --git a/pkg/stanza/operator/transformer/move/move.go b/pkg/stanza/operator/transformer/move/move.go index 9b5974600fd4..bb88b1fa92e4 100644 --- a/pkg/stanza/operator/transformer/move/move.go +++ b/pkg/stanza/operator/transformer/move/move.go @@ -73,7 +73,7 @@ func (p *Transformer) Process(ctx context.Context, entry *entry.Entry) error { func (p *Transformer) Transform(e *entry.Entry) error { val, exist := p.From.Delete(e) if !exist { - return fmt.Errorf("move: field does not exist") + return fmt.Errorf("move: field does not exist: %s", p.From.String()) } return p.To.Set(e, val) } diff --git a/pkg/stanza/operator/transformer/remove/remove.go b/pkg/stanza/operator/transformer/remove/remove.go index 9c92baaca69f..7559c7c81260 100644 --- a/pkg/stanza/operator/transformer/remove/remove.go +++ b/pkg/stanza/operator/transformer/remove/remove.go @@ -81,7 +81,7 @@ func (p *Transformer) Transform(entry *entry.Entry) error { _, exist := entry.Delete(p.Field.Field) if !exist { - return fmt.Errorf("remove: field does not exist") + return fmt.Errorf("remove: field does not exist: %s", p.Field.Field.String()) } return nil }