Module: Anthropic::Models::Beta::BetaDreamingError

Extended by:
Internal::Type::Union
Defined in:
lib/anthropic/models/beta/beta_dreaming_error.rb

Overview

The output_behavior.memory_store_id target is still held by a prior {type: "update_existing"} dream — one that is pending or running, or was canceled with its final writes still landing. Rarely the named dream has just finished (completed/failed) and its execution is still closing; an immediate retry then almost always succeeds. The message names the holding dream when the server can identify it (rarely omitted); poll it to a terminal state or cancel it, then retry. Carried with x-should-retry: false.

Defined Under Namespace

Modules: Type

Class Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants

Methods included from Internal::Util::SorbetRuntimeSupport

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

Methods included from Internal::Type::Converter

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

Class Method Details

.new(type:, **args) ⇒ Anthropic::Models::BetaInvalidRequestError, ...

Creates a new instance of the variant class whose type matches the given value, passing the remaining arguments to its constructor.

Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaDreamingError for more details.

Parameters:

  • type (Symbol, String)
  • args (Hash{Symbol=>Object})

    Attributes for the chosen variant.

    @option args [String] :message Human-readable description of the conflict, naming the dream that holds the targ

Returns:

Raises:

  • (ArgumentError)


74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/anthropic/models/beta/beta_dreaming_error.rb', line 74

def self.new(type:, **args)
  case type.to_sym
  when :invalid_request_error
    Anthropic::BetaInvalidRequestError.new(**args)
  when :authentication_error
    Anthropic::BetaAuthenticationError.new(**args)
  when :billing_error
    Anthropic::BetaBillingError.new(**args)
  when :permission_error
    Anthropic::BetaPermissionError.new(**args)
  when :not_found_error
    Anthropic::BetaNotFoundError.new(**args)
  when :rate_limit_error
    Anthropic::BetaRateLimitError.new(**args)
  when :timeout_error
    Anthropic::BetaGatewayTimeoutError.new(**args)
  when :api_error
    Anthropic::BetaAPIError.new(**args)
  when :overloaded_error
    Anthropic::BetaOverloadedError.new(**args)
  when :conflict_error
    Anthropic::Beta::BetaTargetStoreHeldError.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/beta_dreaming_error.rb', line 53