is a convenience function for creating a `State(type=StateType.FAILED)`; you can check if a state is failed with
state.is_failed()
t
Tim Enders
10/24/2022, 6:42 PM
Hmmm, I am getting this exception and I think it is because of the new state handling? Right?
Copy code
<class 'prefect.exceptions.MissingResult'>: State data is missing. Typically, this occurs when result persistence is disabled and the state has been retrieved from the API.
z
Zanie
10/24/2022, 6:55 PM
Yeah. I can investigate attaching some data to user-returned states, but we use
None
to tell if data has been persisted now.
Zanie
10/24/2022, 6:56 PM
You can attach
data="something"
to your
Completed
state and it should work. Or
data=LiteralResult(value=None)
t
Tim Enders
10/24/2022, 7:00 PM
Thanks. I am no longer getting the error so I am not sure what exactly happened, but I will remember this when/if if comes up again.
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.