Unexpected FeedGroup already exists error when recreating a deleted FeedGroup

Aperta
#8 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
api

Direzione di ricerca

Inizia riproducendo la sequenza mostrata con DeleteFeedGroupAsync e GetOrCreateFeedGroupAsync usando la versione dell’SDK indicata e l’ID "polls3". Verifica il comportamento dell’API e la documentazione relativa agli ID di FeedGroup eliminati; il lavoro è completato quando il comportamento di riutilizzo è stato risolto oppure la restrizione è chiaramente documentata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C#
Stelle
2
Fork
0
Merge medio
6h 55m
PR unite (30g)
19

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GetStream/getstream-net

Tutte le issue di GetStream/getstream-net

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.