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

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

Constant Summary collapse

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

Constants inherited from Payload

Payload::MAX_SERIALIZED_BYTES

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Error

Returns a new instance of Error.



25
26
27
28
29
30
31
# File 'lib/smith/workflow/composite/error.rb', line 25

def initialize(attributes)
  owned = self.class.normalize_attributes(attributes)
  owned[:kind] = owned[:kind].to_s if owned[:kind]
  super(owned)
  validate_retryability!
  validate_kind!
end