struct

AI::OpenAI::OpenAIErrorInfo

Inherits JSON::Serializable < Struct < Value < Object

OpenAI error information structure.

The additional information below is handled loosely to support OpenAI-compatible providers that have slightly different error responses.

Constructors

new(message : String, type : String | Nil = nil, param : JSON::Any | Nil = nil, code : String | Int64 | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

code

The error code (optional, can be string or number).

Source
message

The error message (required).

Source
param

The parameter that caused the error (optional, can be any value).

Source
type

The error type (optional).

Source