Better and more explicit Pydantic error messages #2696
Labels
Community Contribution Needed
We want community to contribute
critical
good first issue
Good for newcomers
kind/bug
priority/p2
wontfix
This will not be worked on
Is your feature request related to a problem? Please describe.
The Pydantic errors can be very annoying to debug when the error messages are not explicit or (as often seen) completely missing. I provide two specific examples bellow but many more can be found throughout the codebase.
Describe the solution you'd like
Always include explicit error messages to all Pydating validation checks.
Additional context
A couple of examples:
👆 In this example, the
feast.errors.FeastProviderNotSetError
exception should be raised instead of a blank AssertionError. The error message here would be explicit (i.e."Provider is not set, but is required"
)👆 Just like in the other example, it is impossible to see what the issue here is. In this case, the
get_offline_config_from_type
function should be raising an explicit exception with a"Offline store types should end with 'OfflineStore', got {offline_store_type} instead."
message instead of an empty AssertionError. This way it would be immediately clear what the issue was.The text was updated successfully, but these errors were encountered: