Repository navigation
fix(client): accept an empty body when deleting a push notification config - #1445
Merged
mykytanetipa merged 2 commits intoNov 13, 2026
Merged
mykytanetipa merged 2 commits into
mykytanetipa merged 2 commits into
Conversation
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/client/transports/rest.py | 89.57% | 89.95% | 🟢 +0.38% |
| Total | 93.63% | 93.63% | ⚪️ 0.00% |
Generated by coverage-comment.yml
…onfig
The spec leaves the result of DeleteTaskPushNotificationConfig to the
implementation. This SDK's server answers `{}`, a2a-js answers 204 No
Content and a2a-go a 200 with no body. RestTransport parsed every
success response as JSON, so against the other two servers the config
was deleted but the call raised `A2AClientError: JSON Decode Error`.
The delete now checks the status and does not read the body. Error
responses still map to A2A errors through _handle_http_error.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
coder-abu
force-pushed
the
fix/rest-delete-push-config-empty-body
branch
from
November 12, 2026 12:24
f9619f5 to
7b4082f
Compare
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.
Description
RestTransport.delete_task_push_notification_configgoes through_execute_request, which always callsresponse.json(). The spec leaves the result to the server (3.1.10: "Confirmation of deletion (implementation-specific)"), and the SDKs answer differently:{};rest_handler.ts);handleDeleteTaskPushConfig).Against a2a-js or a2a-go servers, the config is deleted, but the Python client then raises
A2AClientError: JSON Decode Error. A caller that retries or reports the failure is acting on a delete that succeeded.The delete now sends its request, checks the status, and does not read the body. Error responses still go through
_handle_http_error, so a 404 withTASK_NOT_FOUNDstill raisesTaskNotFoundError.send_http_requestand the JSON-RPC transport are unchanged.The repro at the end of this description answers the delete the way each server does. On main (2cc1dd5):
On this branch, all three print
ok.The new tests also cover a mapped error and a closed client on this path. I left the cross-version tests out because their servers don't start within the 3 s timeout on my machine; the same happens on main.
ruff check,ruff formatandty checkpass.typrints only the three existing unusedtype: ignorewarnings.#1439 touches
send_http_requestand the transport type hints. This change stays insidedelete_task_push_notification_configto keep out of its way, apart from one added import. #1436 percent-encodes the ids in this method's path, so whichever of the two lands second has a one-line conflict there; I'll rebase this one if #1436 goes first.CONTRIBUTINGGuide.bash scripts/format.shfrom the repository root to format)No issue exists, since the new tests reproduce it.
Repro script
🤖 Generated with Claude Code