If a type hook raises a KeyError and its corresponding field has a default value, then it will be eaten by dacite in the try/except block here and the default value will be used.
In reality, the user probably needs to know that their type hook failed rather than resorting to the default value for the field silently.
If a type hook raises a
KeyError
and its corresponding field has a default value, then it will be eaten bydacite
in the try/except block here and the default value will be used.In reality, the user probably needs to know that their type hook failed rather than resorting to the default value for the field silently.