Merge pull request #488 from koic/raise_resource_not_found_in_conformance_fixture
[Conformance] Raise `ResourceNotFoundError` for unknown resource URIs
This commit is contained in:
commit
8e30f325ce
1 changed files with 3 additions and 1 deletions
|
|
@ -942,7 +942,9 @@ module Conformance
|
||||||
).to_h,
|
).to_h,
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
[]
|
# Per SEP-2164, an unknown URI answers with -32602 carrying the URI in `error.data`;
|
||||||
|
# an empty `contents` array is forbidden.
|
||||||
|
raise MCP::Server::ResourceNotFoundError.new(uri, params)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue