capture HTML tag extraction in Sentry so that we have full completion text
This commit is contained in:
parent
cda34ae642
commit
5e00b406af
@ -1,5 +1,7 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
|
import sentry_sdk
|
||||||
|
|
||||||
|
|
||||||
def extract_html_content(text: str):
|
def extract_html_content(text: str):
|
||||||
# Use regex to find content within <html> tags and include the tags themselves
|
# Use regex to find content within <html> tags and include the tags themselves
|
||||||
@ -11,4 +13,7 @@ def extract_html_content(text: str):
|
|||||||
print(
|
print(
|
||||||
"[HTML Extraction] No <html> tags found in the generated content: " + text
|
"[HTML Extraction] No <html> tags found in the generated content: " + text
|
||||||
)
|
)
|
||||||
|
sentry_sdk.capture_exception(
|
||||||
|
Exception(" No <html> tags found in the generated content")
|
||||||
|
)
|
||||||
return text
|
return text
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user