Unexpected FeedGroup already exists error when recreating a deleted FeedGroup

オープン
#8 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
csharp
領域
api

調査の方向性

まず、報告された SDK バージョンと ID "polls3" を使用して、DeleteFeedGroupAsync と GetOrCreateFeedGroupAsync で示されているシーケンスを再現します。削除された FeedGroup ID に対する API の動作とドキュメントを確認します。再利用の動作が解決されるか、制限が明確に文書化されれば完了です。

索引モデルが 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分
マージ済み PR(30日)
19

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

GetStream/getstream-net のほかの issue

GetStream/getstream-net の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。