Error Handling
Error Handling
The monitor automatically captures and reports errors:
@monitor_function()
def divide_numbers(a: float, b: float) -> float:
if b == 0:
raise ValueError("Cannot divide by zero")
return a / b
result = divide_numbers(10, 0)
print(result["status"]) # "error"
print(result["errors"]) # List of error messages