diff --git a/libs/dyn/convert/normalize.go b/libs/dyn/convert/normalize.go index 08b55e7e4..58cd13dfd 100644 --- a/libs/dyn/convert/normalize.go +++ b/libs/dyn/convert/normalize.go @@ -117,10 +117,7 @@ func (n normalizeOptions) normalizeStruct(typ reflect.Type, src dyn.Value, seen } if err := out.Set(pk, nv); err != nil { - return dyn.InvalidValue, diag.Diagnostics{diag.Diagnostic{ - Severity: diag.Error, - Summary: err.Error(), - }} + return dyn.InvalidValue, diag.FromErr(err) } }