<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
How to Add Error Handling to a Flow
Workflows
Okta Classic Engine
Okta Identity Engine
Overview

When a card execution fails, the flow execution will stop. Any cards after the error card will not be executed. This article details how to add error handling to a flow and continue execution when an error occurs.

Applies To
  • Okta Workflows
Solution

In the screenshot below, the API call fails, the flow stops executing, and the Assign card is not processed.

Card execution error  
Card execution error

 

Another example where flow execution stops is when the Read User card results in an error (when providing an invalid user ID).

Card execution error  
Card execution error

 

It is desired 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. If something is tried and fails, the if error logic will be called, allowing continuity in the execution flow.

Using the API example from above, this is how the Try section looks. Place cards inside the Try section.

If Error card – Try section

If Error card – Try section

 

This is how the If Error section looks. Add any cards to process the error.

If Error card – section to handle error

If Error card – section to handle error

 

The If Error card allows defining the output. Based on the path taken, the Number will be set to either 100 or -100.

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.

Flow execution continues after an error

Flow execution continues after an error

 

In the same way, place Read User inside the Try section of the If Error card.

If Error card – Try section

If Error card – Try section

 

If Error card – section to handle error

If Error card – section to handle error

 

Even though the Read User card results in an error, the flow execution continues. The Assign card outside of If Error was processed.

 

Related References

Loading
How to Add Error Handling to a Flow