bug: JSON-RPC errors drop the server's 401 and 503 message, showing only the HTTP status
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
a2aclient/jsonrpc.go(约第 124-125 行和第 156-157 行)中的 JSON-RPC 客户端在状态码不是 200 时直接返回,不读取响应体,原因在于依赖 a2a-go v2.6.0。请先检查 go.mod,然后将 a2a-go 升级到其 internal/jsonrpc 中的 FromHTTPError 会解析错误响应体的版本。当 a2a send 遇到 401 或 503 时能输出服务器的信息而不仅是 HTTP 状态码,并与 --transport rest 的输出一致,即为完成。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Go
- 星标
- 181
- 派生
- 28
- 平均合并
- 2 天 11 小时
- 30 天内合并 PR
- 22
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
a2aproject/a2a-cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
a2aproject/a2a-cli#159 ·
维护者通常 2 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 75/100
a2aproject/a2a-cli#15 · 2 条评论 · 1 个 reaction ·
维护者通常 2 天内回复
-
bug: [flagparse] loopback references with paths default to HTTPS可能已有人在做 @ktsoator 于 2 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 25/100
a2aproject/a2a-cli#162 ·
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 42/100
a2aproject/a2a-cli#160 ·
维护者通常 2 天内回复
-
bug: an unknown --a2a-version is not a usage error可能已有人在做 @ConnorMoss02 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 25/100
a2aproject/a2a-cli#155 ·
维护者通常 2 天内回复
查看 a2aproject/a2a-cli 的全部 Issue
相似的 Issue
-
ssa: wait errors drop the kstatus message, so health check failures don't say why可能已有人在做 @schdief 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
Pin and verify Security Insights schema in lintinsights target可能已有人在做 @imshubham22apr-gif 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
gemaraproj/gemara#618 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
a2aproject/a2a-go#597 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 4 天内回复
-
scopes: GetAllowedTopics, GetProtectedTopics, and GetScopedTopics include empty topic names and do not trim whitespace characters可能已有人在做 @patelshivani2283-lab 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复