Skip to content

Commit

Permalink
Add sent_id in error reporting after try rules
Browse files Browse the repository at this point in the history
  • Loading branch information
bguil committed Feb 12, 2025
1 parent 66dda2d commit 300edde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/utils/grew_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,8 @@ def format_trees_new(m, trees, is_package: bool = False):
try:
sentence_json = sentenceConllToJson(conll)
except Exception as e:
abort(400, 'The result of your query can not be processed by ArboratorGrew beacuse: {}'.format(str(e)))
abort(400, 'The result of your query can not be processed by ArboratorGrew in sentence `{}` because: {}'.format(sent_id, str(e)))

sentence_text = constructTextFromTreeJson(sentence_json["treeJson"])
trees[sample_name][sent_id] = {
"sentence": sentence_text,
Expand Down

0 comments on commit 300edde

Please sign in to comment.