Skip to content

Commit

Permalink
handle errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-goenka committed Aug 15, 2024
1 parent 3592de9 commit 9c1f33b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bundle/config/validate/all_resources_have_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (m *allResourcesHaveValues) Apply(ctx context.Context, b *bundle.Bundle) di

diags := diag.Diagnostics{}

dyn.MapByPattern(
_, err := dyn.MapByPattern(
rv,
dyn.NewPattern(dyn.AnyKey(), dyn.AnyKey()),
func(p dyn.Path, v dyn.Value) (dyn.Value, error) {
Expand Down Expand Up @@ -54,6 +54,9 @@ func (m *allResourcesHaveValues) Apply(ctx context.Context, b *bundle.Bundle) di
return v, nil
},
)
if err != nil {
diags = append(diags, diag.FromErr(err)...)
}

return diags
}

0 comments on commit 9c1f33b

Please sign in to comment.