Automatic retries

Networks hiccup, servers are busy, Shopify throttles. A step that fails for such a temporary reason is tried again automatically, so a short outage does not fail your run.

One rule stands behind every decision: a step is only repeated when repeating it cannot apply something twice. A failure is either

  • not executed - the request provably did not run: the server said "not now", Shopify throttled the call, the connection was never made. Safe to repeat for any step.
  • unknown - it may have run: a timeout, a server error, a connection that broke. Repeated only when doing it twice changes nothing, such as a read.
  • permanent - a validation error, a wrong login, a 404, code that threw. Never repeated: trying again would give the same answer.

The setting

Steps that can be retried have a section If it fails in their side panel:

  • When the step fails for a temporary reason: Retry automatically or Do not retry.
  • Extra tries: 3 by default, 5 at most.
  • First wait (seconds): 2 by default. The wait doubles with every try, 30 seconds at most. If the other side names a waiting time, it is respected.

Every try is listed in the run history. A preview never retries.

What counts as temporary, per step

Step Tried again when Never tried again
HTTP request The server answered 425, 429 or 503. For GET, PUT and DELETE also: a timeout, a failed connection, 408 or 5xx A POST or PATCH that may have arrived. Any other answer
Shopify Admin API (GraphQL) Shopify throttled the call or could not be reached. A query also after a timeout or a server error A mutation that Shopify may have run. userErrors
Ready-made actions The action could not be started: the sandbox was busy or could not be reached An action that ran and failed
Run function The sandbox was busy or could not be reached Code that ran and then threw an error or timed out
Send email The mail server could not be reached or asked to try again later A refused address, a wrong login, a reached sending limit
Liquid script Shopify throttled or could not be reached while the script was reading, or before its first action ran Anything after an action went through
Storage The store was busy, unreachable or timed out
Key-value store The database could not be reached Counting up, because it could count twice
File transfer The server could not be reached, the connection timed out or broke. A delete or a move only when the server was never reached A wrong login, a missing file
Download file The server could not be reached, timed out, or answered 408, 429 or 5xx A refused address, a file that is too large, any other answer
Files Files could not be reached A full store, a file that is too large

Condition, Repeat for each, Wait, Start another workflow, Log and Fail the run have no retries: they do not talk to anything that can be temporarily away.

When all tries are used up

The step fails, the run ends as Failed, and you get the failure alert if it is on. The run history shows each try with its error, for example Failed after 4 tries. A step that needed more than one try and then worked shows Succeeded on try 3.

From the run's page, Run again starts a new run with the same event, once the other side is back.

Retries and time

Retries happen inside the run and use its time. A try that would start after the run's time is up is not made. Inside a Repeat for each, each item's steps have their own tries.

What retries are not

Retries cover the steps of a run. They do not replay events that never reached the app, and they do not re-run a whole run that failed. A run that was interrupted while running is marked Failed and not run again, because its earlier steps may already have had effects.