https://prefect.io logo
Title
r

Ryan Brennan

03/28/2023, 4:04 AM
Is there a way for a callable passed to
on_failure
to access to the Exception class and/or traceback raised by the task?
Nevermind, I've figured this out... you can use
prefect.states.get_state_exception(state_obj)
exception = prefect.states.get_state_exception(state_obj) 

traceback = exception.__traceback__