← Course Home
Okta Certified Workflows - Specialty · Part I

Building Flows

43% of Part I — the exam's largest section, split across 4 modules.

Building Flows · Module 3

Sub-topic: Error Handling

this deck covers 4 of 4 sub-topics in this module

↑ Module 3 Overview

The Scenario

"Set explicit error handling using If-Error for the cards in a flow"

There are two distinct error-handling layers in Workflows: card-level retry settings, and the If Error try/catch container for scripted alternate paths.

Layer 1: Card-Level Error Handling

Click the Other options gear icon on a card → Error handling. Set Retry (how many times to re-execute, default 0) and After (wait between retries, default 5 minutes). Then set what happens if it still fails: Halt Flow, Return Values (send a custom message to another flow), or Run another Flow (a helper flow, which reads the error via its Error output field).

The Gotcha — Retries Are Narrow

Card-level retries only fire for HTTP 429 Too Many Requests. A defined list of status codes never triggers a retry regardless of your settings: 400, 401, 402, 403, 404, 405, 409, 413, 421, 422 (client) and 500, 503, 504 (server) — because extra attempts can't change the outcome. For those, you need If Error instead.

Layer 2: If Error (Try/Catch)

If Error is a container with a Try section (one or more actions/functions) and an If Error section (alternate actions run only if the Try section errors). Add it after the cards you want protected, then drag those cards in — starting with the rightmost. An error object is available inside the If Error block with message, code, method, flo, and execution fields.

Okta recommends a limit of no more than 3 nested If Error blocks to avoid parsing errors.

A Second Gotcha — Return Behaves Differently Inside

Think of a Try or If Error block as an anonymous helper flow. A Return or Continue If (when false) card placed inside one doesn't halt the whole flow — it just proceeds to the step immediately after the If Error container, same as returning from a helper flow. To actually halt the flow, use Return Error, Return Error If, or a Continue If card placed outside the block.

One Line To Remember

Card-level retry (gear icon → Error handling) only fires on HTTP 429, with Halt/Return Values/Run-a-Flow as the failure fallback; If Error adds a Try/If-Error container (max ~3 nested) whose error object exposes message/code/method/flo/execution — but Return or Continue-If inside it behaves like exiting a helper flow, not halting the parent, so use Return Error / Return Error If outside the block to truly stop.

Sources: help.okta.com — Set error handling for cards in flows (ext-error-handling), If Error (ext-control-method-trycatch)

✓ Module 3 — 4 of 4 sub-topics complete