fix: Use correct errors when rejecting messages to terminal tasks - #1207
Open
lkk7 wants to merge 1 commit into
Open
fix: Use correct errors when rejecting messages to terminal tasks#1207lkk7 wants to merge 1 commit into
lkk7 wants to merge 1 commit into
Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/server/request_handlers/default_request_handler_v2.py | 94.25% | 94.35% | 🟢 +0.10% |
| Total | 93.12% | 93.12% | ⚪️ 0.00% |
Generated by coverage-comment.yml
mykytanetipa
requested changes
Aug 30, 2026
Collaborator
There was a problem hiding this comment.
@lkk7 Same bug class on SubscribeToTask, they must be fixed together so SendMessage and SubscribeToTask reject terminal tasks consistently, otherwise we would introduce confusing divergence for error handling.
Spec requires UnsupportedOperationError for both:
- SendMessage (3.1.1)
- SubscribeToTask (3.1.6 / 9.4.6): "Returns UnsupportedOperationError if the task is in a terminal state (…)."
Today SubscribeToTask raises the wrong error via ActiveTask.start():
# active_task.py:
if task.status.state in TERMINAL_TASK_STATES:
raise InvalidParamsError(message=f'Task {task.id} is in terminal state: {task.status.state}')
Collaborator
|
Also, please expand the PR description to state the current vs spec-expected behavior explicitly |
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.
Fixes #1205.
CONTRIBUTINGGuide.fix:which represents bug fixes, and correlates to a SemVer patch.feat:represents a new feature, and correlates to a SemVer minor.feat!:, orfix!:,refactor!:, etc., which represent a breaking change (indicated by the!) and will result in a SemVer major.bash scripts/format.shfrom the repository root to format)