Skip to content

Commit 8e30f32

Browse files
authored
Merge pull request #488 from koic/raise_resource_not_found_in_conformance_fixture
[Conformance] Raise `ResourceNotFoundError` for unknown resource URIs
2 parents 29647de + ff48f5c commit 8e30f32

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎conformance/server.rb‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,9 @@ def configure_resources_read_handler(server)
942942
).to_h,
943943
]
944944
else
945-
[]
945+
# Per SEP-2164, an unknown URI answers with -32602 carrying the URI in `error.data`;
946+
# an empty `contents` array is forbidden.
947+
raise MCP::Server::ResourceNotFoundError.new(uri, params)
946948
end
947949
end
948950
end

0 commit comments

Comments
 (0)