Unexpected FeedGroup already exists error when recreating a deleted FeedGroup
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先,使用报告的 SDK 版本和 ID "polls3",重现通过 DeleteFeedGroupAsync 和 GetOrCreateFeedGroupAsync 展示的序列。检查 API 对已删除 FeedGroup ID 的行为及相关文档;当重用行为得到解决或限制得到明确记录时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
When I delete a FeedGroup using DeleteFeedGroupAsync and then immediately try to recreate one with the same ID using GetOrCreateFeedGroupAsync, I receive a BadRequest error stating that the feed group already exists.
It’s unclear whether this is expected behavior or an API issue — it seems like the deletion should make the ID available again.
code snippet:
// Build the client
var builder = new ClientBuilder()
.ApiKey(apiKey)
.ApiSecret(secret);
var client = builder.Build();
var feedsClient = builder.BuildFeedsClient();
// Create a FeedGroup
var myFeedGroupFirstResponse = await feedsClient.GetOrCreateFeedGroupAsync("polls3", new GetOrCreateFeedGroupRequest()
{
Custom = new Dictionary<string, object>()
{
{ "description", "A feed group for polls" }
}
});
Console.WriteLine($"Feed Group created with ID: {myFeedGroupFirstResponse.Data.FeedGroup.ID}");
// Delete the FeedGroup
await feedsClient.DeleteFeedGroupAsync("polls3");
Console.WriteLine("Deleted existing feed group 'polls3' if it existed.");
// Attempt to recreate the same FeedGroup
var myFeedGroup = await feedsClient.GetOrCreateFeedGroupAsync("polls3", new GetOrCreateFeedGroupRequest()
{
Custom = new Dictionary<string, object>()
{
{ "description", "A feed group for polls" }
}
});
Console.WriteLine($"Feed Group created with ID: {myFeedGroup.Data.FeedGroup.ID}");
Observed Behavior
The second call to GetOrCreateFeedGroupAsync throws:
GetStream.GetStreamApiException: HTTP BadRequest: {"code":4,"message":"GetOrCreateFeedGroup failed with error: \"Feed group with ID \"polls3\" already exists\"","StatusCode":400,"duration":"0.00ms","more_info":"https://getstream.io/chat/docs/api_errors_response","details":[]}
Expected Behavior
After deleting a feed group, I should be able to create another feed group with the same ID — or, if this is intentionally disallowed, the SDK/API documentation should clarify that deletion does not fully release the ID.
Environment
SDK: GetStream.StreamNet 2.1.0
.NET version: .NET 10
cc @itsmeadi
- 主要语言
- C#
- 星标
- 2
- 派生
- 0
- 平均合并
- 6 小时 55 分钟
- 30 天内合并 PR
- 19
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
GetStream/getstream-net 的其他 Issue
-
难度 4/5 1-2 天 新手友好度 35/100
GetStream/getstream-net#100 · 9 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 55/100
维护者通常 1 天内回复
查看 GetStream/getstream-net 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/calculator#2532 ·
-
area: scaffold status: needs-tests
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
provider:flagd type:fix
难度 2/5 1-3 小时 新手友好度 74/100
open-feature/dotnet-sdk-contrib#789 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 72/100
NimblePros/Metronome#23 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
jsboige/CoursIA#28504 · 3 条评论 ·
维护者通常 1 天内回复