Exception: Anthropic::Models::CompactionBlockMisplacedError

Inherits:
Errors::BadRequestError show all
Defined in:
lib/anthropic/models/compaction_block_misplaced_error.rb,
sig/anthropic/models/compaction_block_misplaced_error.rbs

Overview

The compaction block is not the first block of the conversation, or is in a system message.

Constant Summary

Constants inherited from Errors::BadRequestError

Errors::BadRequestError::HTTP_STATUS

Instance Attribute Summary

Attributes inherited from Errors::APIStatusError

#status

Attributes inherited from Errors::APIError

#body, #headers, #status, #url

Attributes inherited from Errors::Error

#cause

Instance Method Summary collapse

Methods inherited from Errors::APIStatusError

#`type`, #api_message, for, #initialize, #type

Methods inherited from Errors::APIError

#initialize, #request_id, #workspace_id

Constructor Details

This class inherits a constructor from Anthropic::Errors::APIStatusError

Instance Method Details

#details ⇒ Anthropic::Models::CompactionBlockMisplacedErrorDetails



12
13
14
15
16
17
# File 'lib/anthropic/models/compaction_block_misplaced_error.rb', line 12

def details
  Anthropic::Internal::Type::Converter.coerce(
    Anthropic::CompactionBlockMisplacedErrorDetails,
    Anthropic::Internal::Util.dig(body, [:error, :details])
  )
end

#error_code ⇒ Symbol, :compaction_block_misplaced

Returns:

  • (Symbol, :compaction_block_misplaced)


# File 'lib/anthropic/models/compaction_block_misplaced_error.rb', line 8