diff --git a/src/pydantic_avro/base.py b/src/pydantic_avro/base.py index 6e16a30..a652a91 100644 --- a/src/pydantic_avro/base.py +++ b/src/pydantic_avro/base.py @@ -151,6 +151,9 @@ def get_type(value: dict) -> dict: value_type = value_type.get("type") avro_type_dict["type"] = {"type": "map", "values": value_type} else: + if t is None: + raise ValueError(f"Field '{value}' does not have a defined type.") + raise NotImplementedError( f"Type '{t}' not support yet, " f"please report this at https://github.com/godatadriven/pydantic-avro/issues"