Add ResourceNotFound error code (-32002) (#1062)

This commit is contained in:
Copilot 2025-12-05 10:39:30 -08:00 • committed by GitHub
commit d76bc16bd1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -434,7 +434,7 @@ internal static class Program
}
ResourceContents contents = resourceContents.FirstOrDefault(r => r.Uri == request.Params.Uri)
?? throw new McpProtocolException($"Resource not found: '{request.Params.Uri}'", McpErrorCode.InvalidParams);
?? throw new McpProtocolException($"Resource not found: '{request.Params.Uri}'", McpErrorCode.ResourceNotFound);
return new ReadResourceResult
{