Module: Floe::Workflow::ErrorMatcherMixin

Included in:
Catcher, Retrier
Defined in:
lib/floe/workflow/error_matcher_mixin.rb

Overview

Methods for common error handling

Instance Method Summary collapse

Instance Method Details

#match_error?(error) ⇒ Boolean

Parameters:

  • error (String)

    the error thrown

Returns:

  • (Boolean)


8
9
10
11
12
13
14
# File 'lib/floe/workflow/error_matcher_mixin.rb', line 8

def match_error?(error)
  return false if error == "States.Runtime"
  return true if error_equals.include?("States.ALL")
  return true if error_equals.include?("States.Timeout") && error == "States.HeartbeatTimeout"

  error_equals.include?(error)
end