Hi! Depending on the error, there are a few ways you can handle it.
- We have support for catching tool errors and turning them into messages
- You can throw exceptions from your graph and catch them in your code that calls
invokeon the graph - Your approach can work too if you don’t want to disrupt the graph’s execution, but if you want the graph to short circuit on an unexpected exception you probably want to raise an exception.