Is there any way to get the name/id/etc. of the task that failed in a flow? Idea being to be able to put in a slack message which task in the flow failed.
j
Jessica Smith
02/06/2023, 5:18 PM
Where are you trying to get it from? The API? The actual python code in the flow?
s
scott
02/06/2023, 5:18 PM
Using Prefect Automations
j
Jessica Smith
02/06/2023, 5:23 PM
That is a very good question. I wonder if you could get it out of the state attribute. Hopefully someone else has an actual answer
s
scott
02/06/2023, 5:23 PM
Okay, yeah would be a nice treat to see which task failed 😄
scott
02/06/2023, 5:24 PM
I’ll look into state
scott
02/06/2023, 6:27 PM
Poked around some - most likely candidate seems to be
task_run_results
via your docs - but i’m not sure how i’d pull the task name from that. locally testing, and i’m not sure how to get a failed task and also get metadata from
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.