Skip to content

Commit 0cd887a

Browse files
committed
Link SEP-2164 in docstring and drop redundant comment
1 parent 854a24c commit 0cd887a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/mcp/server/mcpserver/exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ class ResourceNotFoundError(ResourceError):
1717
"""Resource does not exist.
1818
1919
Raise this from a resource template handler to signal that the requested instance does not exist;
20-
clients receive `-32602` (invalid params) per SEP-2164.
20+
clients receive `-32602` (invalid params) per
21+
[SEP-2164](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2164).
2122
"""
2223

2324

src/mcp/server/mcpserver/resources/templates.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,4 @@ async def create_resource(
137137
raise
138138
except Exception as exc:
139139
logger.exception(f"Error creating resource from template {uri}")
140-
# If an exception happens when creating the resource, we should not leak the exception to the client.
141140
raise ResourceError(f"Error creating resource from template {uri}") from exc

0 commit comments

Comments
 (0)