Skip to content

fix: surface detailed workflow errors in the UI#131

Open
yuefengw wants to merge 1 commit into
HKUDS:mainfrom
yuefengw:fix/frontend-error-details
Open

fix: surface detailed workflow errors in the UI#131
yuefengw wants to merge 1 commit into
HKUDS:mainfrom
yuefengw:fix/frontend-error-details

Conversation

@yuefengw
Copy link
Copy Markdown

Description

This PR improves workflow error visibility in the new UI. Instead of only showing a generic failure message, the backend now propagates structured error details through the status API and workflow WebSocket, and the frontend displays the failed stage, error category, task/log references, and actionable troubleshooting hints.

It also fixes a related terminal-state handling issue where pipeline results with status: "error" could be broadcast as completion messages.

Related Issues

Closes #84

Changes Made

  • Added error_details to workflow task state, status API responses, and workflow WebSocket error/status messages.
  • Classified common workflow failures, including provider/gateway timeouts such as 504 Gateway Time-out.
  • Included task identifiers, failed stage, progress, log paths, and log stream URL in structured error details.
  • Kept the existing error string field for backward compatibility.
  • Added a reusable frontend WorkflowErrorDetails component for Paper-to-Code and Chat Planning error cards.
  • Preserved detailed errors during task recovery after page refresh.
  • Ensured pipeline results with status: "error" are broadcast as error events, not completion events.
  • Added regression tests for structured error details and error-state broadcasting.

Checklist

  • Changes tested locally
  • Code reviewed
  • Documentation updated (if necessary)
  • Unit tests added (if applicable)

Additional Notes

Local validation performed:

python -m pytest tests/ui_session_resume_test.py -q
python -m py_compile new_ui/backend/services/workflow_service.py new_ui/backend/api/routes/workflows.py new_ui/backend/api/websockets/workflow_ws.py new_ui/backend/models/responses.py
cd new_ui/frontend && npm run build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Question]:Could we display more error details on the frontend when an error occurs?

1 participant