dcolli23 / ingreedyents

Optimizes the use of ingredients by ingredient UPC lookup
0 stars 0 forks source link

Add error handling if unit is not in our string_to_mass_unit map #47

Open dcolli23 opened 3 years ago

dcolli23 commented 3 years ago

Description

In the Nutrient class, we go from the JSON result string to a uniTypes type through the string_to_mass_unit map. We need to add some error handling if the unit that is in the JSON file is not in our map.

We could simply enough just skip over this nutrient. That's likely what I'll do for the time being.