Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 521 Bytes

ai-invalid-prompt-error.mdx

File metadata and controls

26 lines (18 loc) · 521 Bytes
title description
AI_InvalidPromptError
Learn how to fix AI_InvalidPromptError

AI_InvalidPromptError

This error occurs when the prompt provided is invalid.

Properties

  • prompt: The invalid prompt value
  • 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_InvalidPromptError using:

import { InvalidPromptError } from 'ai';

if (InvalidPromptError.isInstance(error)) {
  // Handle the error
}