diff --git a/backend/codegen/utils.py b/backend/codegen/utils.py index 9eeb4fd..caad0f7 100644 --- a/backend/codegen/utils.py +++ b/backend/codegen/utils.py @@ -13,7 +13,8 @@ def extract_html_content(text: str): print( "[HTML Extraction] No tags found in the generated content: " + text ) - sentry_sdk.capture_exception( - Exception(" No tags found in the generated content") - ) + try: + raise Exception("No tags found in the generated content") + except: + sentry_sdk.capture_exception() return text