web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Overriding OnError beh...
Copilot Studio
Suggested Answer

Overriding OnError behavior so the agent can continue

(1) ShareShare
ReportReport
Posted on by 2
Hello!
I'm currently building an agent using Generative orchestration. The agent has instructions and some tools available. In some situations, the tools fail (HTTP 400) because the agent calls them with wrong parameters. When this happens, the OnError system topic is triggered, which shows an error message and stops the agent loop.
The agent is able to recover if the user issues an explicit "continue" or "try again", but this makes for a pretty lame UX.
 
Is it possible to turn off the OnError behavior and let the agent see the error message and continue until the orchestrator is done? Most other agent harnesses support this, but I couldn't find a configuration that implements this behavior in Copilot Studio. I tried removing "End all topics" as the last node of OnError, I tried adding "End topic", I tried switching to a different topic, I tried turning off the OnError topic entirely. How is this done?
I have the same question (0)
  • Suggested answer
    Vish WR Profile Picture
    3,748 on at
     
    Hi,
    What you're seeing is largely expected behavior with Copilot Studio generative orchestration today. When a tool throws a hard failure (like HTTP 400), the orchestrator often escalates it to the OnError system topic, and there currently isn't a built-in “silently recover and continue” setting.
     
    The most reliable workarounds right now are:
     
    Option 1 — Handle errors inside the Power Automate flow (Recommended)
    Instead of allowing the HTTP 400 to bubble back to Copilot Studio:
    - Use Configure run after on the failing actions
    - Catch the failure inside the flow
    - Return a valid structured response back to Copilot Studio such as:
      - "Tool failed"
      - "Invalid parameters"
      - "Retry with corrected input"
    This prevents the orchestrator from treating it as a fatal tool error, so the OnError topic may never trigger.
     
    Option 2 — Modify the OnError topic
    Inside the OnError system topic:
    - Remove End all topics
    - Avoid terminating the full conversation
    - Redirect to a recovery topic or orchestration entry point
    - Optionally set a variable like ErrorOccurred = true
    This can sometimes allow the orchestrator to continue, although behavior is not always fully deterministic with generative orchestration.
     
    Option 3 — Improve tool instructions and validation
    Add guidance in your agent instructions such as:
    > “If a tool call fails or returns invalid parameters, retry with corrected parameters instead of ending the conversation.”
    Also consider validating parameters before calling the tool to reduce HTTP 400 responses entirely.
     
    Option 4 — Use softer recovery messaging
    Instead of displaying a hard error message in OnError:
    - Replace it with something neutral like:
      - “Let me try that another way.”
    - Use End topic instead of End all topics
    In some cases this may allow orchestration to resume more naturally.
     
     
     
    References:
     
    Vishnu WR
     
    Please  Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like 
  • Suggested answer
    Romain The Low-Code Bearded Bear Profile Picture
    2,876 Super User 2026 Season 1 on at
    i m curious, but if a prompt is not enough to improve it, you could create a topic and manage manualy the input from the topic :)
  • Vish WR Profile Picture
    3,748 on at
     
    Wanted to check if you can resolve your problem ? Let me know if you need any clarification 
     
     
    When replying please dont forget to mention my userid so that it will be notified 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 277

#2
11manish Profile Picture

11manish 206

#3
sannavajjala87 Profile Picture

sannavajjala87 156 Super User 2026 Season 1

Last 30 days Overall leaderboard