trafaret_forked
trafaret_forked copied to clipboard
trafaret.DataError's method as_dict returns either string or dict
Is that intended to be so or just some legacy code or smth? IMHO, it is:
- Misguiding
- Introduces necessity to validate and convert the result
Wouldn't it be better to always return dicts?
Again this is a long time behaviour and definitely it need to be solved. Will think.
This also results in aiohttp_admin's exceptions during passing validation errors to frontend in util.py and mongo_utils.py (lines with **exc.as_dict()
)