AI_InvalidToolArgumentsError
This error occurs when invalid tool argument was provided.
Properties
toolName
: The name of the tool with invalid argumentstoolArgs
: The invalid tool argumentsmessage
: The error messagecause
: The cause of the error
Checking for this Error
You can check if an error is an instance of AI_InvalidToolArgumentsError
using:
import { InvalidToolArgumentsError } from 'ai';
if (InvalidToolArgumentsError.isInstance(error)) { // Handle the error}