In my last post I walked through wiring a Copilot Studio agent to write to Dataverse through a Power Automate flow. I mentioned one thing I'd change: how the agent handles failure. This post is that fix.
The problem with generic errors
The first version of the flow was solid for the happy path - user asks, agent collects fields, flow writes to Dataverse, done. The failure path was the opposite of solid: any failure, whatever the cause, turned into the same flat "Something went wrong, please try again" message back to the user.
That's fine in a form. It's a dead end in a conversation. A form at least shows which field is red. A chat message that just restates failure gives the user nothing to act on - they either retype the entire request from scratch or give up.
Why this happens by default
It's the easy path, honestly. The simplest version of any Copilot Studio topic that calls a flow just checks "did the flow succeed" and branches into a single canned message on failure. It works in your own testing, because you already know what you typed and you don't test the broken paths as often as the working one.
The actual failures that show up in practice are specific and recoverable: a required field was empty, a lookup didn't resolve, a value failed a business rule in Dataverse. Every one of those has a different, useful follow-up question - but only if the agent knows which one happened.
The fix: let the flow talk back
The change is on both sides:
In the flow: instead of a single success/fail output, return a structured result - a status plus a reason code plus a human-readable message when it fails. A Scope with a Configure run after on failure, feeding a consistent output schema ({success: false, reasonCode: "MissingPriority", message: "..."}), is enough.
In the Copilot Studio topic: branch on that reason code, not just on success/failure. Each reason code maps to a short, specific follow-up question back to the user - not a restart of the whole topic, just the one missing piece.
The result: the same failure that used to be a dead end becomes one clarifying question, and the user finishes the task in the same conversation instead of abandoning it.
What's still manual
This doesn't cover every failure gracefully yet - a genuine platform outage or a throttled connection still needs a real "try again later," and that's correct; not everything should be reframed as a question. The distinction that matters is between failures the user caused (missing input, invalid value - these deserve a follow-up question) and failures the system caused (outage, throttling, permissions - these deserve an honest "this isn't something you can fix right now").
The actual lesson
Error handling in a conversational interface isn't a separate feature bolted onto the "real" logic - it's part of the conversation design itself. A flow that only returns true/false is making the error-handling decision for you, before the agent ever gets a chance to have a reasonable follow-up. Returning the reason, not just the result, is what turns a dead end back into a conversation.

Top comments (0)