Fix: modern resources/read with an unknown URI returns -32602
Web-audit fix skill for the
mcp-modern-resources-misscheck (MCP, SHOULD).
Goal
Answer an unknown resource URI with the typed miss code, not a hang or a fake result.
Fix
Answer a modern resources/read (with Mcp-Name mirroring params.uri) for a URI that matches no resource with error.code: -32602. That is the code current SDK lines put on the wire for a resource miss; -32002 (the legacy resource-not-found code) is also tolerated from non-SDK servers. A hang, a 500, or a fabricated 200 result fails. This check only runs when the server advertises resources on either era lane.
Resources
Copy-paste prompt
Paste this into your coding agent. Your audit adds what it observed for this check:
Verify
Re-run the audit at https://anc.dev/audit or call the audit_website MCP tool; the mcp-modern-resources-miss check should report pass.