pinecone-io / pinecone-client

Apache License 2.0
12 stars 2 forks source link

Improve error message in case of metadata value error #16

Open igiloh-pinecone opened 1 year ago

igiloh-pinecone commented 1 year ago

Problem

When the user pass metadata field in some unsupported type - the error message was not very clear.

Solution

No easy way around it. In case the direct translation from PyDict to <BTreeMap<String, MetadataValue>> fails (it will only fail if one of the fields is in the wrong type) - try explicitly to convert field by field, and raise a proper error at the field level.

Type of Change