class

AI::Provider::InvalidResponseDataError

Inherits AI::Provider::AISDKError < Exception < Reference < Object

Error thrown when the server returns a response with invalid data content.

This should be thrown by providers when they cannot parse the response from the API.

Constructors

new(*, data, message : String | Nil = nil)

Creates a new InvalidResponseDataError.

Parameters:

  • data: The invalid response data (any type)
  • message: Optional custom message (defaults to formatted data representation)
Source

Class methods

instance?(error) : Bool

Checks if the given value is an instance of InvalidResponseDataError.

Source

Instance methods

data

The invalid response data. Stored as JSON::Any to handle any type.

Source