3.2.4. Error Handling and Monitoring
💡 First Principle: In a flow, failure is a branch you author, not an exception that happens to you. Every action carries run-after conditions — succeeded, failed, skipped, timed out — and error handling means routing those states deliberately: retry, compensate, notify, or fail loudly. A flow with no failure branches has silently chosen "stop and say nothing" as its error strategy.
| Run-after state | Typical routing |
|---|---|
| Has succeeded (default) | Continue the happy path |
| Has failed | Error branch: log, notify owner, return a graceful message to the agent |
| Has timed out | Escalate or retry — common for approvals that sit too long |
| Has been skipped | Housekeeping for branches that never ran |
The canonical structure is try/catch built from scopes: group the risky actions, add a parallel branch configured to run only on failure/timeout, and route that branch to whatever accountability demands — often ending by returning an error output to the calling agent so the conversation can apologize usefully instead of hanging. Retry policies on transient-prone actions (flaky APIs, throttled services) absorb noise before it ever reaches the error branch.
Monitoring closes the loop: run history in Copilot Studio shows each run's status and per-action results — the flow author's primary debugging surface (and the flow-scoped layer of the monitoring stack from 2.4.3). Habitually checking failure patterns in run history is what turns "users say it sometimes doesn't work" into "the CRM connector times out weekdays at 9 AM."
⚠️ Common Misconception: Failed actions are retried and handled automatically. Defaults only continue on success; anything else stops silently unless you authored run-after routing. Retry exists, but as a policy you configure, not a guarantee you inherit.
Reflection Question: A ticket-creation flow occasionally fails when the ITSM API throttles. Compose the three-part defense — what absorbs transient failures, what handles persistent ones, and what does the conversation see in each case?