Python: Title: DevUI Fix WorkflowFailedEvent error extraction #2706
Merged
victordibia merged 4 commits intomainfrom Dec 8, 2025
Merged
Python: Title: DevUI Fix WorkflowFailedEvent error extraction #2706victordibia merged 4 commits intomainfrom
victordibia merged 4 commits intomainfrom
Conversation
…d of error Body: Summary Fixed WorkflowFailedEvent mapping to extract error message from details.message instead of non-existent error attribute Added support for including details.extra context in error messages when present Problem The WorkflowFailedEvent handler in _mapper.py was reading event.error, but WorkflowFailedEvent uses a details attribute (of type WorkflowErrorDetails), not error. This caused all workflow failures to display "Unknown error" in the UI instead of the actual error message. Fix Updated the handler to match the pattern already used by ExecutorFailedEvent: Read from event.details instead of event.error Extract details.message for the error text Include details.extra context when available
Member
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in WorkflowFailedEvent error extraction where the handler was reading from a non-existent error attribute instead of the correct details.message field, causing all workflow failures to display "Unknown error".
Key Changes:
- Updated
WorkflowFailedEventhandler to correctly extract error messages fromdetails.message(WorkflowErrorDetails type) - Added support for including
extracontext from WorkflowErrorDetails in error messages - Enhanced test coverage to verify correct error message extraction and extra context handling
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| python/packages/devui/agent_framework_devui/_mapper.py | Fixed error extraction logic to read from details.message instead of non-existent error attribute, and added handling for extra context field |
| python/packages/devui/tests/test_mapper.py | Added assertions to verify actual error message extraction (not "Unknown error") and added new test for extra context inclusion |
…ework into devui_fix_error_msg
dmytrostruk
approved these changes
Dec 8, 2025
TaoChenOSU
approved these changes
Dec 8, 2025
arisng
pushed a commit
to arisng/agent-framework
that referenced
this pull request
Feb 2, 2026
…oft#2706) * Title: Fix WorkflowFailedEvent error extraction to use details instead of error Body: Summary Fixed WorkflowFailedEvent mapping to extract error message from details.message instead of non-existent error attribute Added support for including details.extra context in error messages when present Problem The WorkflowFailedEvent handler in _mapper.py was reading event.error, but WorkflowFailedEvent uses a details attribute (of type WorkflowErrorDetails), not error. This caused all workflow failures to display "Unknown error" in the UI instead of the actual error message. Fix Updated the handler to match the pattern already used by ExecutorFailedEvent: Read from event.details instead of event.error Extract details.message for the error text Include details.extra context when available * improve error handling consistency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Summary
WorkflowFailedEventmapping to read fromdetails.messageinstead of non-existenterrorattributeProblem
WorkflowFailedEventhandler readevent.error, but the class usesdetails(typeWorkflowErrorDetails). This caused workflow failures to always display "Unknown error" instead of the actual message.Test plan
test_workflow_failed_event_with_extrato verifydetails.extrainclusiontest_workflow_failed_eventto verify actual error message extractionDescription
Contribution Checklist