- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 03:48 AM
Hi Everyone,
I am having an doubt about the Error Handling in the Flow Designer. Below is scenario,
"In my flow, which includes a subflow, both the main flow and the subflow have error handlers enabled. If an error occurs in the main flow, an incident is created through its error handler. If the error occurs within the subflow, will the incident be created by the subflow’s error handler, the main flow’s error handler, or both?"
Thank you in advance! @Ankur Bawiskar
Regards,
Raviteja
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 03:50 AM
Hi @raviteja1600 ,
If the subflow's error is not handled within the subflow, and the subflow does not have its error handler configured to prevent the error from cascading, the error will propagate to the parent flow and trigger its error handler if one is enabled.
Please mark as solution, if this resolves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 05:05 AM
here is the link for explanation
Flows Best Practices Error Handling - Workflow Automation CoE
My thoughts
1) if subflow has error handler then it will create INC. the main flow's error handler won't create another INC
2) if subflow has no error handler then the error will propagate to main flow and flow's error handler will execute and create INC
3) If both error handlers are designed to create incidents and the error is re-thrown:
Both could create incidents, but this only happens if the subflow’s error handler explicitly re-throws or fails to handle the error, which is not the default behavior
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 03:50 AM
Hi @raviteja1600 ,
If the subflow's error is not handled within the subflow, and the subflow does not have its error handler configured to prevent the error from cascading, the error will propagate to the parent flow and trigger its error handler if one is enabled.
Please mark as solution, if this resolves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 05:05 AM
here is the link for explanation
Flows Best Practices Error Handling - Workflow Automation CoE
My thoughts
1) if subflow has error handler then it will create INC. the main flow's error handler won't create another INC
2) if subflow has no error handler then the error will propagate to main flow and flow's error handler will execute and create INC
3) If both error handlers are designed to create incidents and the error is re-thrown:
Both could create incidents, but this only happens if the subflow’s error handler explicitly re-throws or fails to handle the error, which is not the default behavior
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 06:08 AM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader