Class: OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsError::Error

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

Overview

See Also:

  • OpenAI::Models::Responses::ResponsesServerEvent::ResponseWsError#error

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, #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:, headers: nil) ⇒ Object

Details about the error.

Parameters:

  • code (String, nil)

    The error code that was emitted, if any.

  • message (String)

    The human-readable error message that was emitted.

  • param (String, nil)

    The parameter name that was associated with the error, if any.

  • type (String)

    The error type that was emitted.

  • headers (Hash{Symbol=>String}) (defaults to: nil)

    The response headers that were emitted with the error, if any.



# File 'lib/openai/models/responses/responses_server_event.rb', line 1232

Instance Attribute Details

#codeString?

The error code that was emitted, if any.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


1206
# File 'lib/openai/models/responses/responses_server_event.rb', line 1206

required :code, String, nil?: true

#headersHash{Symbol=>String}?

The response headers that were emitted with the error, if any.

Parameters:

  • (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String}, nil)


1230
# File 'lib/openai/models/responses/responses_server_event.rb', line 1230

optional :headers, OpenAI::Internal::Type::HashOf[String]

#messageString

The human-readable error message that was emitted.

Parameters:

  • value (String)

Returns:

  • (String)


1212
# File 'lib/openai/models/responses/responses_server_event.rb', line 1212

required :message, String

#paramString?

The parameter name that was associated with the error, if any.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


1218
# File 'lib/openai/models/responses/responses_server_event.rb', line 1218

required :param, String, nil?: true

#typeString

The error type that was emitted.

Parameters:

  • value (String)

Returns:

  • (String)


1224
# File 'lib/openai/models/responses/responses_server_event.rb', line 1224

required :type, String

Instance Method Details

#to_hash{

Returns:

  • ({)


1833
# File 'sig/openai/models/responses/responses_server_event.rbs', line 1833

def to_hash: -> {