One workflow charges the customer, sends an email and an SMS, then updates the order. The definition has "on_error": "retry" at the top level. A failing SMS held up the whole run, and I'm not sure retry is right for the charge either.
Which on_error should payment steps and notification steps use?
Common question, written up by the Supero team.
Linkrev 1
1 answer
Accepted answer
Accepted answer
Set a workflow-level default and override it per step. A step's own on_error wins, then the workflow's, then stop. The engine reference recommends:
- payment and other financial steps:
stoporcompensate, nevercontinue, so a failed charge isn't silently swallowed; - email, SMS and Slack steps:
continue, so a bounced notification doesn't block the rest; - external calls that fail transiently:
retry; - sub-steps inside a
parallelstep: usuallycontinue, so one channel failing doesn't block the others.
json
{"id": "sms_notify", "type": "service_call", "service": "sms", "operation": "send_sms",
"on_error": "continue",
"input_map": {"to_number": "{{input.phone}}", "body": "Your order has shipped."}}retry repeats the step up to max_retries times (default 3), waiting retry_delay_seconds between attempts (default 2). If every attempt fails, the step is treated as stop. condition and transform steps never retry, even when retry is set. Once any step fails under continue, the run ends as partial instead of completed.
Linkrev 1
Your answer
Know the answer? Sign in to post it. It takes an email address and a 6-digit code.
Sign in to answer