# Fix: modern resources/read with an unknown URI returns -32602

> Web-audit fix skill for the `mcp-modern-resources-miss` check (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

- [MCP resources (2026-07-28)](https://modelcontextprotocol.io/specification/2026-07-28/server/resources)
- [JSON-RPC 2.0](https://www.jsonrpc.org/specification#error_object)

## Copy-paste prompt

Paste this into your coding agent. [Your audit](https://anc.dev/audit) adds what it observed for this check:

```text
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.
Skill: https://anc.dev/fix/mcp-modern-resources-miss
Docs: https://modelcontextprotocol.io/specification/2026-07-28/server/resources, https://www.jsonrpc.org/specification#error_object
```

## Verify

Re-run the audit at [https://anc.dev/audit](https://anc.dev/audit) or call the `audit_website` MCP tool; the `mcp-modern-resources-miss` check should report `pass`.
