Class: OpenAI::Models::Beta::SessionError

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/beta/session_error.rb,
sig/openai/models/beta/session_error.rbs

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, coerce_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(code:, message:, param:, type:) ⇒ Object

An error payload with the same public fields as Responses API streaming errors.

Parameters:

  • code (String, nil)

    The machine-readable error code, if any.

  • message (String)

    A customer-safe explanation of the error.

  • param (String, nil)

    The request parameter associated with the error, if any.

  • type (String)

    The error type.



# File 'lib/openai/models/beta/session_error.rb', line 31

Instance Attribute Details

#codeString?

The machine-readable error code, if any.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


11
# File 'lib/openai/models/beta/session_error.rb', line 11

required :code, String, nil?: true

#messageString

A customer-safe explanation of the error.

Parameters:

  • value (String)

Returns:

  • (String)


17
# File 'lib/openai/models/beta/session_error.rb', line 17

required :message, String

#paramString?

The request parameter associated with the error, if any.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


23
# File 'lib/openai/models/beta/session_error.rb', line 23

required :param, String, nil?: true

#typeString

The error type.

Parameters:

  • value (String)

Returns:

  • (String)


29
# File 'lib/openai/models/beta/session_error.rb', line 29

required :type, String

Instance Method Details

#to_hash{

Returns:

  • ({)


23
# File 'sig/openai/models/beta/session_error.rbs', line 23

def to_hash: -> {