Open
Description
- Datenguide Python version: 0.3.0
- Python version: All
- Operating System: All
Description
When specifying an invalid field in the query builder this raises a key error. This could raise a more descriptive error (maybe KeyError or ValueError) that makes it explicit that the field is not a valid sub field of its parent. It could also point towards the available fields/ the get_info function that returns this information to the user.
What I Did
from datenguidepy.query_builder import Query
q = Query.region('01')
q.add_field('NOT_VALID')
# Example on a different hierarchy level
q = Query.region('11')
s = q.add_field('BEVSTD')
s.add_field('ANOTHER_INVALID_FIELD')