We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents df27a3c + 23f5f27 commit 43203eeCopy full SHA for 43203ee
src/providers/WorkflowCore.Persistence.MongoDB/Services/MongoPersistenceProvider.cs
@@ -315,10 +315,16 @@ public async Task ScheduleCommand(ScheduledCommand command)
315
{
316
await ScheduledCommands.InsertOneAsync(command);
317
}
318
+ catch (MongoWriteException ex)
319
+ {
320
+ if (ex.WriteError?.Category == ServerErrorCategory.DuplicateKey)
321
+ return;
322
+ throw;
323
+ }
324
catch (MongoBulkWriteException ex)
325
326
if (ex.WriteErrors.All(x => x.Category == ServerErrorCategory.DuplicateKey))
- return;
327
328
throw;
329
330
0 commit comments