Deprecate McpErrorCode.ResourceNotFound (-32002) and use McpErrorCode.InvalidParams (-32602) per SEP-2164 (#1558)

This commit is contained in:
Jayaraman Venkatesan 2026-05-26 10:59:03 -04:00 • committed by GitHub
commit b99d887b46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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