Skip to content

How to interpret errors

Validation errors

The faas config is validated before the feature calculation starts. If there are any problems you will most likely receive exception with verbose error message. To learn how to interpret them, let's look at some examples.

Example 1:

faas_client.api.ServiceException: status=422,
detail="[{'type': 'union_tag_invalid', 'loc': ['body', 'features', '1'],
'msg': "Input tag 'cirlec' found using 'type' does not match any of the expected tags: 'circle', 'distance', 'huff', 'isochrone', 'match', 'match_aggregate', 'near'",
'input': {'type': 'cirlec', 'dataset': 'ru-pub-households/apartments', 'metric': 'foot', 'field': 'price', 'agg': 'sum', 'limit': 1000, 'fillna': 0},
'ctx': {'discriminator': "'type'", 'tag': 'cirlec', 'expected_tags': "'circle', 'distance', 'huff', 'isochrone', 'match', 'match_aggregate', 'near'"},
'url': 'https://errors.pydantic.dev/2.5/v/union_tag_invalid'}]")

Error interpretation: incorrect feature name cirlec.

Example 2:

faas_client.api.ServiceException: status=422,
detail="[{'type': 'value_error', 'loc': ['body', 'features', '1', 'huff'],
'msg': 'Value error, No such dataset: foot',
'input': {'type': 'huff', 'dataset': 'foot', 'metric': 'foot', 'field': 'price', 'agg': 'sum', 'limit': 1000, 'fillna': 0},
'ctx': {'error': {}}, 'url': 'https://errors.pydantic.dev/2.5/v/value_error'}]")

Error interpretation: dataset with name foot does not exist.

Runtime errors

Runtime errors are errors that occur during feature calculation. These errors are recorded in the error field of the result.

Example:

Mongo error in feature: {'type': 'huff', 'dataset': 'ru-pub-households/apartments', 'filter': {'year': {'$inn': [2014, 2015, 2017]}}, 'metric': 'dist', 'weight': None, 'field': 'price', 'agg': 'sum', 'limit': 1000, 'fillna': 0.0, 'metric_funcs': [], 'infl_func': None, 'winner_takes_all': False}.
Please check your mongo filter syntax. Message: unknown operator: $inn

Error interpretation: a typo in the mongo operator, should be $in instead of $inn.

If you encounter a runtime error and do not know how to fix it, please contact support.