Hello, is there any way to run arbitrary code when...
# ask-community
v
Hello, is there any way to run arbitrary code when a sensor run fails? Suppose for example I have the following sensor code:
Copy code
@sensor(job=test_job)
def test_sensor(default_status=DefaultSensorStatus.RUNNING):
    raise RuntimeError ("test_error")
    return RunRequest(run_config=run_config)
Given the raise error the sensor will never succeeded, is there any way to run code to say alert a user that their sensor is failing, without modifying the actually code run under the sensor function?
v
Thanks!