Overview
Copy
record_exception(exception: Exception, attributes: Dict = None, timestamp: int = None, escaped: bool = False) -> bool
Example
Copy
from keywordsai_tracing import task, get_client
@task(name="fail_demo")
def fail_demo():
client = get_client()
try:
raise ValueError("bad input")
except Exception as e:
client.record_exception(e, {"phase": "validation"})
return "handled"
print(fail_demo())