Hello, I'm using `slack_notifier` as my flow's sta...
# prefect-community
a
Hello, I'm using
slack_notifier
as my flow's state_handler, but it does not seem to get called when my task fails. I get notified when it starts and ends. My pipeline is set such that failing_task -> task (trigger_will_fail) -> recovery_task (task triggers only on fail and sets state to success, otherwise is skipped). I ideally want to be notified that we encountered a failure, even though we do end up doing failure recovery and setting the final state to a success.
c
Hi Alex - you can attach state handlers on either Tasks or Flows. It sounds like you attached yours to your Flow, which means it will only get called on your Flow’s state transitions. If you want to have it called on an individual task, you should attach it to the task you are interested in getting failure alerts for
a
Oh I see, thought a flow would take the state of its tasks. Thanks!
c
No problem!