Dustin Duong
08/18/2023, 5:56 PMtask_future.wait()
if task_future.get_state().is_failed():
name_ = task_future.task_run.name
id_ = task_future.task_run.flow_run_id
<http://requests.post|requests.post>(
SLACK_WEBHOOK_URL,
json={"text": f"The task `{name_}` failed in a flow run `{id_}`"},
)
Though, I was thinking it'd be wildly helpful for there to also be a way we could also include the error log in there. Is there a way for the error log to be posted to the slack_webhook_url?Jake Kaplan
08/18/2023, 8:34 PMstate.message
has the string of the exception:
@task
def my_task():
raise ValueError("I failed!")
gives state.message='Task run encountered an exception ValueError: I failed!'
but if you want the full traceback you'll have to do something else