AI_ToolExecutionError
This error occurs when there is a failure during the execution of a tool.
Properties
toolName: The name of the tool that failedtoolArgs: The arguments passed to the tooltoolCallId: The ID of the tool call that failedmessage: The error messagecause: The underlying error that caused the tool execution to fail
Checking for this Error
You can check if an error is an instance of AI_ToolExecutionError using:
import { ToolExecutionError } from 'ai';
if (ToolExecutionError.isInstance(error)) { // Handle the error}