diff --git a/bundle/mutator.go b/bundle/mutator.go index 6c9968aac..462d53d3f 100644 --- a/bundle/mutator.go +++ b/bundle/mutator.go @@ -35,17 +35,7 @@ func Apply(ctx context.Context, b *Bundle, m Mutator) diag.Diagnostics { } }() - diags := m.Apply(ctx, b) - - // Log error in diagnostics if any. - // Note: errors should be logged when constructing them - // such that they are not logged multiple times. - // If this is done, we can omit this block. - if err := diags.Error(); err != nil { - log.Errorf(ctx, "Error: %s", err) - } - - return diags + return m.Apply(ctx, b) } type funcMutator struct { diff --git a/bundle/mutator_read_only.go b/bundle/mutator_read_only.go index ee4e36e0f..777198f13 100644 --- a/bundle/mutator_read_only.go +++ b/bundle/mutator_read_only.go @@ -20,10 +20,5 @@ func ApplyReadOnly(ctx context.Context, rb ReadOnlyBundle, m ReadOnlyMutator) di ctx = log.NewContext(ctx, log.GetLogger(ctx).With("mutator (read-only)", m.Name())) log.Debugf(ctx, "ApplyReadOnly") - diags := m.Apply(ctx, rb) - if err := diags.Error(); err != nil { - log.Errorf(ctx, "Error: %s", err) - } - - return diags + return m.Apply(ctx, rb) }