enhance: refine error log of json parse error (#30671)

add more error info when json format does not match.
relate to https://github.com/milvus-io/milvus/issues/29837

Signed-off-by: xiaofanluan <xiaofan.luan@zilliz.com>
This commit is contained in:
Xiaofan 2024-02-24 12:32:14 +08:00 committed by GitHub
parent 58260864b5
commit d970a9fc6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -374,7 +374,7 @@ func (v *validateUtil) checkJSONFieldData(field *schemapb.FieldData, fieldSchema
for _, data := range jsonArray {
err := json.Unmarshal(data, &jsonMap)
if err != nil {
log.Warn("insert invalid JSON data",
log.Warn("insert invalid JSON data, milvus only support json map without nesting",
zap.ByteString("data", data),
zap.Error(err),
)