https://prefect.io logo
Title
k

Kyle McChesney

10/14/2022, 4:37 PM
Interesting question, I have the following flow state function (simplified for example)
def flow_updater(flow, current_state, next_state):
    if isinstance(next_state, Failed):
        error_information = {k.name: v.message for k, v in next_state.result.items() if type(v) is Failed}
    else:
         error_information = None
    report(error_information)
When I run this flow locally using
prefect run -p path/to/flow.py
with a simulated error, I get the expected error information, however when I run it on our deployment (not cloud, backend in AWS). I get error_information equal to
{}
(i.e. no task results have a result of type
Failed
). Is there some other type that gets used when running connected to server? (I am using
type(v) is Failed
instead of
isinstance
cause I don want to report
TriggerFailed
, etc)
1️⃣ 1
Actually it just seems like
next_state.result
is empty, which is not the case when running locally. 🤔