Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 629 Bytes

ai-invalid-tool-arguments-error.mdx

File metadata and controls

27 lines (19 loc) · 629 Bytes
title description
AI_InvalidToolArgumentsError
Learn how to fix AI_InvalidToolArgumentsError

AI_InvalidToolArgumentsError

This error occurs when invalid tool argument was provided.

Properties

  • toolName: The name of the tool with invalid arguments
  • toolArgs: The invalid tool arguments
  • message: The error message
  • cause: 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
}