class AI::Provider::EmptyResponseBodyError

Overview

Error thrown when an API response body is empty.

This error indicates that the API returned a successful response but with no content in the body.

Defined in:

ai/provider/errors/empty_response_body_error.cr

Constructors

Class Method Summary

Instance methods inherited from class AI::Provider::AISDKError

name : String name, to_s(io : IO) : Nil to_s

Constructor methods inherited from class AI::Provider::AISDKError

new(*, name : String, message : String, cause : Exception | Nil = nil) new

Class methods inherited from class AI::Provider::AISDKError

instance?(error) : Bool instance?

Constructor Detail

def self.new(*, message : String = "Empty response body") #

Creates a new EmptyResponseBodyError.

Parameters:

  • message: Optional custom message (defaults to "Empty response body")

[View source]

Class Method Detail

def self.instance?(error) : Bool #

Checks if the given value is an instance of EmptyResponseBodyError.


[View source]