Add tests for MCPServer.read_resource exception handling (#1957)
This commit is contained in:
parent
6f0e8e7851
commit
14744c66c5
1 changed files with 165 additions and 254 deletions
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue