Skip to content

Commit

Permalink
Error message on calling unknown plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
bosd committed Apr 8, 2023
1 parent 86152bf commit 57123df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/invoice2data/extract/invoice_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ def extract(self, optimized_str: str, invoice_file: str, input_module: str) -> O
for plugin_keyword, plugin_func in PLUGIN_MAPPING.items():
if plugin_keyword in self.keys():
plugin_func.extract(self, optimized_str, output)
else:
logger.error("Template %s calls an unknown plugin %s ", self["template_name"], plugin_keyword)

# If required fields were found, return output, else log error.
if "required_fields" not in self.keys():
Expand Down

0 comments on commit 57123df

Please sign in to comment.