Skip to content

Commit 1e3e62f

Browse files
committed
refactor: McpError renamed and flatten parameters
1 parent 5e57bea commit 1e3e62f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/mcp/client/session_group.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,10 @@ async def _aggregate_components(self, server_info: types.Implementation, session
382382
# Check for duplicates.
383383
matching_prompts = prompts_temp.keys() & self._prompts.keys()
384384
if matching_prompts:
385-
raise MCPError(code=types.INVALID_PARAMS, message=f"{matching_prompts} already exist in group prompts.")
385+
raise MCPError( # pragma: no cover
386+
code=types.INVALID_PARAMS,
387+
message=f"{matching_prompts} already exist in group prompts.",
388+
)
386389
matching_resources = resources_temp.keys() & self._resources.keys()
387390
if matching_resources:
388391
raise MCPError( # pragma: no cover

src/mcp/shared/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def message(self) -> str:
2424

2525
@property
2626
def data(self) -> Any:
27-
return self.error.data
27+
return self.error.data # pragma: no cover
2828

2929
@classmethod
3030
def from_jsonrpc_error(cls, error: JSONRPCError) -> MCPError:

0 commit comments

Comments
 (0)