AI_ToolExecutionError

This error occurs when there is a failure during the execution of a tool.

Properties

  • toolName: The name of the tool that failed
  • toolArgs: The arguments passed to the tool
  • message: The error message
  • cause: 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
}