Class: OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error

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

Overview

See Also:

  • OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError#error

Defined Under Namespace

Classes: Misalignment

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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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, misalignment: nil) ⇒ Error

Returns a new instance of Error.

Parameters:

  • code —

    The error code that was emitted, if any.

  • message —

    The human-readable error message that was emitted.

  • param —

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

  • type —

    The error type that was emitted.

  • headers (defaults to: nil) —

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

  • code: (String, nil)
  • message: (String)
  • param: (String, nil)
  • type: (String)
  • headers: (::Hash[Symbol, String]) (defaults to: nil)
  • misalignment: (OpenAI::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment) (defaults to: nil)


# File 'lib/openai/models/beta/beta_responses_server_event.rb', line 2431

Instance Attribute Details

#code ⇒ String?

The error code that was emitted, if any.

Returns:

  • (String, nil)


2397
# File 'lib/openai/models/beta/beta_responses_server_event.rb', line 2397

required :code, String, nil?: true

#headers ⇒ ::Hash[Symbol, String]?

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

Returns:

  • (::Hash[Symbol, String], nil)


2421
# File 'lib/openai/models/beta/beta_responses_server_event.rb', line 2421

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

#message ⇒ String

The human-readable error message that was emitted.

Returns:

  • (String)


2403
# File 'lib/openai/models/beta/beta_responses_server_event.rb', line 2403

required :message, String

#misalignment ⇒ OpenAI::Models::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment?

Parameters:

  • (OpenAI::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment)

Returns:



2426
2427
2428
2429
# File 'lib/openai/models/beta/beta_responses_server_event.rb', line 2426

optional(
  :misalignment,
  -> { OpenAI::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment }
)

#param ⇒ String?

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

Returns:

  • (String, nil)


2409
# File 'lib/openai/models/beta/beta_responses_server_event.rb', line 2409

required :param, String, nil?: true

#type ⇒ String

The error type that was emitted.

Returns:

  • (String)


2415
# File 'lib/openai/models/beta/beta_responses_server_event.rb', line 2415

required :type, String

Instance Method Details

#to_hash ⇒ { code: String?, message: String, param: String?, type: String, ?headers: ::Hash[Symbol, String], ?misalignment: OpenAI::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment }

Returns:

  • ({ code: String?, message: String, param: String?, type: String, ?headers: ::Hash[Symbol, String], ?misalignment: OpenAI::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment })


3366
3367
3368
3369
3370
3371
3372
3373
# File 'sig/openai/models/beta/beta_responses_server_event.rbs', line 3366

def to_hash: -> {
  code: String?,
  message: String,
  param: String?,
  type: String,
  ?headers: ::Hash[Symbol, String],
  ?misalignment: OpenAI::Beta::BetaResponsesServerEvent::BetaResponseWsError::Error::Misalignment
}