Bug occurs during contact vcard generation process for search results. If a food does not have the nutritional_contents.energy.value key, the shortcut throws a key error and stops execution.
Normally, a missing key would evaluate to an empty string but I believe it is the aspect of a nested key access for a missing key (that is, I am trying to access value when energy does not exist) that is causing the error.
To fix this, I can add checks to only generate the subtitle that uses the nutritional contents if the keys are available.
Bug occurs during contact vcard generation process for search results. If a food does not have the
nutritional_contents.energy.value
key, the shortcut throws a key error and stops execution.Normally, a missing key would evaluate to an empty string but I believe it is the aspect of a nested key access for a missing key (that is, I am trying to access
value
whenenergy
does not exist) that is causing the error.To fix this, I can add checks to only generate the subtitle that uses the nutritional contents if the keys are available.