We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f51888b commit ba11195Copy full SHA for ba11195
pythonkr_backend/curation/utils_trans.py
@@ -54,7 +54,14 @@ def translate_rssitem(rss_item_id: int):
54
)
55
56
# Run translation
57
- result = agent.run_sync(content)
+ try:
58
+ result = agent.run_sync(content)
59
+ except Exception as e:
60
+ # Set RSS item status to failed and save error message
61
+ rss_item.crawling_status = 'failed'
62
+ rss_item.translate_error_message = str(e)
63
+ rss_item.save(update_fields=['crawling_status', 'translate_error_message'])
64
+ raise
65
66
# Create TranslatedContent instance
67
translated_content = TranslatedContent(
0 commit comments