Back to Ai

AI_NoOutputGeneratedError

content/docs/07-reference/05-ai-sdk-errors/ai-no-output-generated-error.mdx

2.1.10529 B
Original Source

AI_NoOutputGeneratedError

This error is thrown when no LLM output was generated, e.g. because of errors.

Properties

  • message: The error message (optional, defaults to 'No output generated.')
  • cause: The underlying error that caused no output to be generated (optional)

Checking for this Error

You can check if an error is an instance of AI_NoOutputGeneratedError using:

typescript
import { NoOutputGeneratedError } from 'ai';

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