OTel client span sets ERROR status for -32602 and other caller-error codes
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- observability
Research direction
Start by reading the dispatcher code that sets client-span status and error.type, then compare its behavior with the server-side classification and the MCP semantic-conventions note in docs/gen-ai/mcp.md. Reproduce with the commands in the issue if practical. Done means the five listed caller-error codes still populate rpc.response.status_code but leave status Unset and omit error.type, with tests covering that behavior.
Written by the indexing model from the issue text.
Description
Since 2.3.0 (#3174) every JSON-RPC error response marks the client span ERROR with error.type set to the code. The OTel GenAI semantic conventions for MCP (docs/gen-ai/mcp.md, footnote on error.type) say the codes -32700, -32600, -32601, -32602 and -32002 "indicate that the caller sent a request the receiver could not serve and SHOULD NOT be considered errors"; only other codes should be. rpc.response.status_code should still carry the code.
The most common case is calling an unknown tool: the Go SDK server (and the TypeScript SDK) answer -32602, and the Python client span becomes ERROR with error.type=-32602.
Reproduction (Python 2.3.0 client against a Go SDK server):
git clone https://github.com/mkwitko/mcp-reliability && cd mcp-reliability
examples/python-sdk-streamable-http/run.sh
go run ./cmd/mcp-reliability doctor testdata/cross-python-client-go-server.jsonl
[WARN] MCP-ERR-005: span "tools/call missing" is marked failed (status=Error, error.type present=true) for a JSON-RPC code the semconv says SHOULD NOT be considered an error
Write-up: https://github.com/mkwitko/mcp-reliability/blob/v0.1.0/docs/research/python-sdk-v2-validation.md
Suggested change: in the dispatcher, when the error code is one of the five caller-error codes, set rpc.response.status_code but leave the span status Unset and skip error.type. The server side already has the equivalent classification. I can send a PR.
- Dominant language
- Python
- Stars
- 24.7k
- Forks
- 4.1k
- Avg merge
- 18h 27m
- Merged PRs (30d)
- 15
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 modelcontextprotocol/python-sdk
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
modelcontextprotocol/python-sdk#3810 ·
Maintainers usually reply within 1 day
-
bug v1 v2
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
modelcontextprotocol/python-sdk#3781 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug]: Inconsistent structured output wrapping and opt-out for typing.Dict and typing sequence generics in func_metadataMay be free again A pull request for this issue was closed without being merged. Openbug v1 v2
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
modelcontextprotocol/python-sdk#3771 · 3 comments ·
Maintainers usually reply within 1 day
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/python-sdk#3769 · 2 comments ·
Maintainers usually reply within 1 day
-
2026 Streamable HTTP rejects whitespace-padded Mcp-Name valuesMay be free again A pull request for this issue was closed without being merged. Openbug spec-2026-07-28 v2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/python-sdk#3763 · 4 comments ·
Maintainers usually reply within 1 day
All issues in modelcontextprotocol/python-sdk
Similar issues
-
Backend issue lists report in-patch warnings and out-of-patch errors as not publishablePossibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mozilla/code-review#3794 ·
Maintainers usually reply within 1 day
-
[oblt-aw][autodoc] Update docs that still describe the security registry as emptyPossibly taken @github-actions claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
[Bug] adb backup script reports "Done" & exits 0 when the backup failsPossibly taken @bhattmanthan claimed this today. Openrequest-issue-assignment
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OWASP/mastg#4034 · 5 comments ·
Maintainers usually reply within 1 day
-
agent-ui bug p2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
correction metadata
Difficulty 1/5 Under an hour Newbie friendliness 72/100
acl-org/acl-anthology#10768 · 1 comment ·
Maintainers usually reply within 1 day