Skip to content

Commit

Permalink
fix: Use clearer error message for unknown tag, #31
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jan 26, 2023
1 parent 691809c commit 37e14da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/exporter/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ def get_tags_mapping(self, texts: List[etree.Element]) -> Tuple[Dict[str, Tag],
tag_class = tags_lookup.get(expression.name)
if tag_class is None:
raise UnknownTagError(
f"The tag '{expression.name}' cannot be used in this context. "
"Also, please make sure the check was computed.",
f"The tag '{expression.name}' is not recognized. Please check the spelling and syntax.",
full_tag,
self.arguments["template"],
)
Expand Down

0 comments on commit 37e14da

Please sign in to comment.