Class: Smith::Workflow::Composite::ErrorEvidence

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Defined in:
lib/smith/workflow/composite/error_evidence.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(error) ⇒ Object



17
# File 'lib/smith/workflow/composite/error_evidence.rb', line 17

def self.call(error) = new(error).call

Instance Method Details

#callObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/smith/workflow/composite/error_evidence.rb', line 19

def call
  attributes = {
    class_name: error_class_name,
    family: error_family,
    retryable: retryable_error?,
    kind: error_kind
  }
  attributes.merge!() if error.is_a?(ToolCaptureFailed)
  Error.new(attributes)
end