bug: JSON-RPC errors drop the server's 401 and 503 message, showing only the HTTP status
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
The JSON-RPC client in a2aclient/jsonrpc.go (around lines 124-125 and 156-157) returns on any non-200 status without reading the body, and the cause is the a2a-go v2.6.0 dependency. Start by checking go.mod and bumping a2a-go to a version whose internal/jsonrpc FromHTTPError parses the error body. Done when a2a send against a 401 or 503 prints the server's message instead of only the HTTP status, matching the output of --transport rest.
Written by the indexing model from the issue text.
Description
Over the default JSON-RPC transport, a2a send and a2a task list print only unexpected HTTP status: 401 Unauthorized or 503 Service Unavailable. They drop the server's error message, so a new user gets no instruction from the CLI.
Repro (against a2a-serve)
a2a send -a "$URL" "hi" # no token, or a revoked or rotated pairing
a2a send -a "$URL" --transport rest "hi"
Expected
The server's A2A error, which a2a-serve sends in the 401 body: this agent needs a token: on the machine running the agent, enable the credential helper of a2a-serve (run a2a-serve doctor --fix); elsewhere, ask the agent's owner for a pairing code and run a2a-serve pair join ``. For 503: "the server is busy; try again later".
Actual
Error: failed to send message: unexpected HTTP status: 401 Unauthorized (exit 1; -o json gives A2ACLI_ERR_INTERNAL), also with -v. --transport rest prints the full hint. This hits example 01 of a2a-serve when a2a-serve doctor --fix was skipped, and every member whose pairing was rotated or removed. It reproduced in 3 lanes, more than 10 times in total.
Cause
a2a v0.4.0 is built with a2a-go v2.6.0 (go version -m). Its JSON-RPC client (a2aclient/jsonrpc.go:124-125, :156-157) returns on any non-200 status without decoding the body. Newer a2a-go parses it in internal/jsonrpc/jsonrpc.go:150-164 (FromHTTPError), so bumping a2a-go should fix it.
Found by user simulation (tools/sim) at 1b67edf.
- Dominant language
- Go
- Stars
- 181
- Forks
- 28
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 22
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from a2aproject/a2a-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
a2aproject/a2a-cli#159 ·
Maintainers usually reply within 2 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
a2aproject/a2a-cli#15 · 2 comments · 1 reaction ·
Maintainers usually reply within 2 days
-
bug: [flagparse] loopback references with paths default to HTTPSPossibly taken @ktsoator claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
a2aproject/a2a-cli#162 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
a2aproject/a2a-cli#160 ·
Maintainers usually reply within 2 days
-
bug: an unknown --a2a-version is not a usage errorPossibly taken @ConnorMoss02 claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
a2aproject/a2a-cli#155 ·
Maintainers usually reply within 2 days
All issues in a2aproject/a2a-cli
Similar issues
-
ssa: wait errors drop the kstatus message, so health check failures don't say whyPossibly taken @schdief claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Pin and verify Security Insights schema in lintinsights targetPossibly taken @imshubham22apr-gif claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
gemaraproj/gemara#618 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
a2aproject/a2a-go#597 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 4 days
-
scopes: GetAllowedTopics, GetProtectedTopics, and GetScopedTopics include empty topic names and do not trim whitespace charactersPossibly taken @patelshivani2283-lab claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day