Deprecate McpErrorCode.ResourceNotFound (-32002) and use McpErrorCode.InvalidParams (-32602) per SEP-2164 (#1558)
This commit is contained in:
parent
712a06b83a
commit
b99d887b46
1 changed files with 77 additions and 15 deletions
|
|
@ -109,7 +109,7 @@ public partial class McpServerBuilderExtensionsResourcesTests : ClientServerTest
|
|||
};
|
||||
}
|
||||
|
||||
throw new McpProtocolException($"Resource not found: {request.Params.Uri}", McpErrorCode.ResourceNotFound);
|
||||
throw new McpProtocolException($"Resource not found: {request.Params.Uri}", McpErrorCode.InvalidParams);
|
||||
})
|
||||
.WithResources<SimpleResources>();
|
||||
}
|
||||
|
|
@ -317,7 +317,7 @@ public partial class McpServerBuilderExtensionsResourcesTests : ClientServerTest
|
|||
cancellationToken: TestContext.Current.CancellationToken));
|
||||
|
||||
Assert.Contains("Resource not found", e.Message);
|
||||
Assert.Equal(McpErrorCode.ResourceNotFound, e.ErrorCode);
|
||||
Assert.Equal(McpErrorCode.InvalidParams, e.ErrorCode);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
Loading…
Reference in a new issue