Add tests for MCPServer.read_resource exception handling (#1957)

This commit is contained in:
Marcelo Trylesinski 2026-01-27 13:49:06 +01:00 • committed by GitHub
commit 14744c66c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -795,12 +795,7 @@ class Server(Generic[LifespanResultT, RequestT]):
await message.respond(response)
else: # pragma: no cover
await message.respond(
types.ErrorData(
code=types.METHOD_NOT_FOUND,
message="Method not found",
)
)
await message.respond(types.ErrorData(code=types.METHOD_NOT_FOUND, message="Method not found"))
logger.debug("Response sent")