fix: Enhance error handling and messaging in orchestration and websocket services
This pull request introduces robust error handling and user feedback mechanisms throughout the orchestration and plan approval workflow, ensuring that network and backend errors are communicated clearly to users and do not cause unexpected UI or backend failures.
Error message handling and display:
- Implemented a standardized error message formatter and updated the UI to ignore incoming WebSocket messages (plan approval, agent streaming, clarification, tool, and final result) when a network error is detected, preventing confusing or misleading UI states.
These changes collectively make the orchestration workflow more resilient to errors and improve the user experience by providing clear feedback when issues arise.
Purpose
Handling exceptions and showing error messages.
Does this introduce a breaking change?
- [ ] Yes
- [x] No
How to Test
- Get the code
What to Check
Basically, when any exceptions occurred, it shouldn't go to a hang state, rather shows a message to user. Few scenarios with screenshots are given.
Verify that the following are valid
Scenario 1: Deleted the agents from foundry and clicked “Approve Task Plan” :
Scenario 2: Disconnected wifi