From e38cb0118d74fdefa6420d6cb051a5835b8d5367 Mon Sep 17 00:00:00 2001 From: fffreedom Date: Fri, 23 Feb 2024 22:00:58 +0800 Subject: [PATCH] =?UTF-8?q?when=20the=20Unmarshaler=20parsing=20value=20by?= =?UTF-8?q?=20fillSliceFromString,=20if=20the=20val=E2=80=A6=20(#3927)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: danahan --- core/mapping/unmarshaler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/mapping/unmarshaler.go b/core/mapping/unmarshaler.go index 1e1f2e67..982d69e5 100644 --- a/core/mapping/unmarshaler.go +++ b/core/mapping/unmarshaler.go @@ -223,11 +223,11 @@ func (u *Unmarshaler) fillSliceFromString(fieldType reflect.Type, value reflect. switch v := mapValue.(type) { case fmt.Stringer: if err := jsonx.UnmarshalFromString(v.String(), &slice); err != nil { - return err + return fmt.Errorf("fullName: `%s`, error: `%w`", fullName, err) } case string: if err := jsonx.UnmarshalFromString(v, &slice); err != nil { - return err + return fmt.Errorf("fullName: `%s`, error: `%w`", fullName, err) } default: return errUnsupportedType