Implement error handling in agent flows
Unlock the complete study guide + 1,040 practice questions across 16 full exams.
Bundled into the existing Designing and Building Integrated AI Agent Solutions in Copilot Studio premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- What breaks, and who needs to hear about it
- Run after: the setting that creates a failure path
- Try and Catch: making a transaction fail as one unit
- Retry policies: the attempts nobody sees
- The failures a retry cannot fix
- The controlled error response
- Logging enough, and not more
- Terminate, and everything that has to happen before it
- Telling an operator, without pretending it is an answer
- How these choices show up in questions
Four mechanisms for one failing action
| Consideration | Run after branch | Try and Catch scopes | Retry policy | Terminate |
|---|---|---|---|---|
| What it changes | Which action executes next, based on the previous action's outcome | The unit that succeeds or fails, from one action to a whole block | How many times the action itself is attempted before it is called failed | Whether execution continues at all |
| Where you configure it | Run after settings on the action that follows | Run after settings on the Catch scope, pointing at the Try scope | Settings of the individual action being retried | An action you add on the failure path |
| The fault it is for | Any outcome you want a different next step for: failed, timed out, skipped, successful | A transaction whose steps are only meaningful together | Transient faults: momentary network loss, temporary unavailability, busy-service timeouts | A nontransient failure with no valid path forward |
| What it costs | One branch to maintain per outcome you handle | Granularity: a failed scope reports a single Failed status for the whole scope | Elapsed time inside the synchronous response window, plus more calls to a service that may be throttling | Everything after it, which is why cleanup goes first |
| What the agent gets | Whatever the branch you routed to maps into Respond to the agent | Whatever the Catch path maps, if the response action is reachable outside the scopes | Nothing different: retries are invisible to the agent unless they exhaust the window | Nothing, unless a response action ran before it |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.
Also tested in
References
- Handle transient faults recommendation for Power Platform workloads
- Agent flows overview - Microsoft Copilot Studio
- Employ robust error handling - Power Automate
- Use scopes to organize actions in cloud flows - Power Automate
- Organize your flows with scopes - Power Automate
- Create an agent flow as a tool - Microsoft Copilot Studio
- Troubleshoot a cloud flow - Power Automate
- Handle errors effectively - Microsoft Copilot Studio
- Understand flow failure notifications in Power Automate
- Set up Application Insights with Power Automate - Power Platform