class
AI::Provider::EmptyResponseBodyError
- AI::Provider::EmptyResponseBodyError
- AI::Provider::AISDKError
- Exception
- Reference
- Object
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.crConstructors
-
.new(*, message : String = "Empty response body")
Creates a new EmptyResponseBodyError.
Class Method Summary
-
.instance?(error) : Bool
Checks if the given value is an instance of EmptyResponseBodyError.
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")
Class Method Detail
def self.instance?(error) : Bool
#
Checks if the given value is an instance of EmptyResponseBodyError.