Class: Smith::Workflow::Composite::Error

Inherits:
Payload
  • Object
show all
Defined in:
lib/smith/workflow/composite/error.rb

Constant Summary collapse

FAMILIES =
%w[
  tool_capture_failed tool_guardrail_failed deterministic_step_failure
  deadline_exceeded agent_error workflow_error other
].freeze

Constants inherited from Payload

Payload::MAX_SERIALIZED_BYTES

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Error

Returns a new instance of Error.



50
51
52
53
54
55
# File 'lib/smith/workflow/composite/error.rb', line 50

def initialize(attributes)
  super(normalize_error_attributes(attributes))
  validate_retryability!
  validate_kind!
  validate_tool_capture_metadata!
end

Class Method Details

.normalize_attributes(attributes) ⇒ Object



32
33
34
35
36
# File 'lib/smith/workflow/composite/error.rb', line 32

def normalize_attributes(attributes)
  return super unless attributes.is_a?(Hash)

  super((attributes))
end