Okta Workflows How-To: How to Add Error Handling to a Flow
Okta Workflows is a no-code platform for automating identity processes. The Workflows team holds weekly office hours where they answer builder questions.
This blog post is based on a question asked during office hours: How to add error handling to a flow and continue execution when an error occurs?
Getting started
When a card execution fails, the flow execution will stop. Any cards after the error card will not be executed.
For example, in the screenshot below, the API call fails, the flow stops running, and the Assign card is not processed.
Another example where flow execution stops is when the Read User card results in an error (when providing an invalid user ID).
You want to gracefully handle the error and continue the flow execution. To do that, use the Error Handling – If Error card.
The If Error card has two sections: Try and If Error. You will try something, and if it fails, the if error logic will be called and will allow you to continue the flow execution.
Using the API example from above, this is how the Try section looks. You place cards inside the Try section.
This is how the If Error section looks. You add any cards to process the error.
The If Error card allows defining output. Based on the path taken, the Number will be set to either 100 or -100.
Tip: Learn how to create outputs for an If/Else card
How-to Guide: How to Handle an External API Call Error in Workflows
If the flow generates an error, the If Error card handles the error, and the flow execution continues. The Assign card outside of If Error was processed.
In the same way, you can place Read User inside the Try section of the If Error card.
a
Even though the Read User card results in an error, the flow execution continues. The Assign card outside of If Error was processed.
Get your Workflows questions answered
Do you have a question about Okta Workflows? Not sure how to build a flow? Join the weekly community office hours to get help.