Class: Anthropic::Models::Beta::MemoryStores::BetaManagedAgentsMemoryPathConflictErrorObject

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_path_conflict_error_object.rb,
sig/anthropic/models/beta/memory_stores/beta_managed_agents_memory_path_conflict_error_object.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, 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(conflicting_memory_id: nil, conflicting_path: nil, message: nil, type: :memory_path_conflict_error) ⇒ BetaManagedAgentsMemoryPathConflictErrorObject

The error returned with HTTP status 409 when you create or rename a memory and the path you give is already used by another memory or overlaps another memory's path.

Two paths overlap when one is an ancestor of the other, such as /notes and /notes/todo.md. To free the path, rename or delete the memory that conflicting_memory_id references, then retry. To change that memory instead of creating a new one, update it.

To handle the error in code, use conflicting_path and conflicting_memory_id instead of message.

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

Parameters:

  • conflicting_memory_id (String) (defaults to: nil) —

    The ID of the memory that blocked the write (mem_...), or an empty string if t

  • conflicting_path (String) (defaults to: nil) —

    The path that blocked the write: the requested path, or the path of a memory tha

  • message (String) (defaults to: nil)
  • type (Symbol, :memory_path_conflict_error) (defaults to: :memory_path_conflict_error)
  • conflicting_memory_id: (String) (defaults to: nil)
  • conflicting_path: (String) (defaults to: nil)
  • message: (String) (defaults to: nil)
  • type: (:memory_path_conflict_error) (defaults to: :memory_path_conflict_error)


# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_path_conflict_error_object.rb', line 34

Instance Attribute Details

#conflicting_memory_id ⇒ String?

The ID of the memory that blocked the write (mem_...), or an empty string if that memory can't be identified.

Retry the request when it is empty.

Parameters:

  • (String)

Returns:

  • (String, nil)


20
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_path_conflict_error_object.rb', line 20

optional :conflicting_memory_id, String

#conflicting_path ⇒ String?

The path that blocked the write: the requested path, or the path of a memory that is an ancestor or descendant of it.

Parameters:

  • (String)

Returns:

  • (String, nil)


27
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_path_conflict_error_object.rb', line 27

optional :conflicting_path, String

#message ⇒ String?

Parameters:

  • (String)

Returns:

  • (String, nil)


32
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_path_conflict_error_object.rb', line 32

optional :message, String

#type ⇒ Symbol, :memory_path_conflict_error

Parameters:

  • value (:memory_path_conflict_error)

Returns:

  • (Symbol, :memory_path_conflict_error)


11
# File 'lib/anthropic/models/beta/memory_stores/beta_managed_agents_memory_path_conflict_error_object.rb', line 11

required :type, const: :memory_path_conflict_error

Instance Method Details

#to_hash ⇒ { type: :memory_path_conflict_error, conflicting_memory_id: String, conflicting_path: String, message: String }

Returns:

  • ({ type: :memory_path_conflict_error, conflicting_memory_id: String, conflicting_path: String, message: String })


35
36
37
38
39
40
# File 'sig/anthropic/models/beta/memory_stores/beta_managed_agents_memory_path_conflict_error_object.rbs', line 35

def to_hash: -> {
  type: :memory_path_conflict_error,
  conflicting_memory_id: String,
  conflicting_path: String,
  message: String
}