careful-dress-39510
12/21/2021, 2:14 AMcareful-dress-39510
12/21/2021, 2:46 AMcareful-dress-39510
12/21/2021, 2:46 AMdef notify_slack_on_error(current):
def decorator(func):
def wrapped(*args, **kwargs) :
try:
return func(*args, **kwargs)
except Exception as e:
slack = Slack(flow_name=current.flow_name)
slack.log_error(message=f"Step: {current.step_name} failed with error: {e}")
return wrapped
return decorator
careful-dress-39510
12/21/2021, 2:46 AMStep start specifies a self.next() transition to an unknown step, wrapped.
straight-shampoo-11124
12/21/2021, 3:35 AMcareful-dress-39510
12/21/2021, 9:34 AMcareful-dress-39510
12/21/2021, 9:13 PMcareful-dress-39510
12/21/2021, 9:13 PMdef notify_slack_on_error(current):
def decorator(func):
@wraps(func)
def wrapped(self) :
try:
return func(self)
except Exception as e:
slack = Slack(flow_name=current.flow_name)
slack.log_error(message=f"Step: {current.step_name} failed with error: {e}")
raise
return wrapped
return decorator
victorious-lawyer-58417
12/21/2021, 9:16 PM