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
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
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