Unexpected FeedGroup already exists error when recreating a deleted FeedGroup

未关闭
#8 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
csharp
领域
api

调研方向

首先,使用报告的 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,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

GetStream/getstream-net 的其他 Issue

查看 GetStream/getstream-net 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。