Michael Duncan

    Michael Duncan

    3 months ago
    Hi everyone, We have a failure callback on our flows that tries to report all of the exceptions that occurred in each task. We previously tried to access the
    state.result
    from the flow which works locally but not in the cloud explained in this answer https://prefect-community.slack.com/archives/CL09KU1K7/p1653606914417649. Is there a good way to collect exceptions from each task and report them in a state handler when the flow fails? We have have alerts on flow failures and we want to report the exceptions in the alert
    Kevin Kho

    Kevin Kho

    3 months ago
    You have 2 options:1. query for the task run states in a Flow level state handler right before completion 2. have a last task that everything feeds to for reporting purposes
    Michael Duncan

    Michael Duncan

    3 months ago
    If we query for the task run states will they have the results with the exceptions in memory? We don’t have persistent results set up yet
    Kevin Kho

    Kevin Kho

    3 months ago
    There should be a message attached to the state
    Michael Duncan

    Michael Duncan

    3 months ago
    Thanks so much!