1
Vote

Avro Library UnionSerializer reports incorrect error message

description

See UnionSerializer::EncodeAvroArray:

(Looks like currently it only supports single arrayschema under union.)

The error message reported is incorrect:

throw new SerializationException(
                    string.Format(
                        CultureInfo.InvariantCulture,
                        "Element type of array schema does not match the object type. Expected: '{0}', actual: '{1}.",
                        arraySchema.RuntimeType,
                        elementType));
Here 'arraySchema.RuntimeType' should be 'arraySchema.ItemSchema.RuntimeType' as the message indicates it is the element's schema.

comments