FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add tests for `MCPServer.read_resource` exception handling by Kludex · Pull Request #1957 · modelcontextprotocol/python-sdk · GitHub

Add tests for MCPServer.read_resource exception handling - #1957

Merged
Kludex merged 7 commits into
mainfrom
add-tests-resource-error
Jan 27, 2026
Merged

Add tests for MCPServer.read_resource exception handling #1957
Kludex merged 7 commits into
mainfrom
add-tests-resource-error

Conversation

Kludex commented Jan 25, 2026

Copy link
Copy Markdown
Member

No description provided.

Cover the two exception paths in read_resource that were previously
excluded from coverage: unknown resource errors and resource read
failures. The tests verify that both cases properly raise MCPError
with appropriate messages.

Also improve exception chaining by using 'from exc' syntax and
simplify the error message format.

claude Bot commented Jan 25, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

maxisbey previously approved these changes Jan 26, 2026
Base automatically changed from refactor-mcp-error to main January 26, 2026 13:37
Kludex dismissed maxisbey’s stale review January 26, 2026 13:37

The base branch was changed.

maxisbey previously approved these changes Jan 26, 2026
Kludex merged commit 14744c6 into main Jan 27, 2026
30 checks passed
Kludex deleted the add-tests-resource-error branch January 27, 2026 12:49
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL