diff --git a/core/mapping/unmarshaler.go b/core/mapping/unmarshaler.go index ff36556d..1e1c4eb9 100644 --- a/core/mapping/unmarshaler.go +++ b/core/mapping/unmarshaler.go @@ -881,9 +881,11 @@ func (u *Unmarshaler) unmarshalWithFullName(m valuerWithParent, v any, fullName typeField := baseType.Field(i) valueField := valElem.Field(i) if err := u.processField(typeField, valueField, m, fullName); err != nil { - if fullName != "" { - err = fmt.Errorf("%s, fullName :%s, typeField :%s, valueField :%s", err.Error(), fullName, typeField.Name, valueField.Type()) + if len(fullName) > 0 { + err = fmt.Errorf("%w, fullName: %s, field: %s, type: %s", + err, fullName, typeField.Name, valueField.Type().Name()) } + return err } }