Is there a way for a callable passed to `on_failur...
# prefect-community
r
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)
Copy code
exception = prefect.states.get_state_exception(state_obj) 

traceback = exception.__traceback__