Hi, I want to execute some code when there are any...
# announcements
b
Hi, I want to execute some code when there are any failures. Specifically, I'm trying to log failure information to a table. What would be the best approach? Currently this is how I'm envisioning it.
a
until we do https://github.com/dagster-io/dagster/issues/2520 that is a reasonable approach
👍 1
s
The
try... except
would be the way I do it
One thing to consider is if you want
solid_b
to run even if
solid_a
threw and caught an exception
You may want to re-raise the exception or use optional outputs to block
solid_b
from executing
You can also raise a
Failure
with some metadata that will be displayed in dagit/event log when you view the run: https://docs.dagster.io/docs/learn/how-tos/conditional_execution#how-do-i-manage-error-handling-in-a-solid
👍 1