Interface ToolExecutionErrorHandler

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ToolExecutionErrorHandler
Handler for ToolExecutionExceptions thrown by a ToolExecutor.

There are two ways to handle errors:

1. Return a text message that will be sent back to the LLM, allowing it to respond appropriately (for example, by correcting the error and retrying).

2. Throw an exception: this will stop the AI service flow. Use ToolErrorContext.rawError() to access the raw error before cause-unwrapping when deciding whether to throw.

Since:
1.4.0
See Also: