diff --git a/apps/server/src/persistence/Layers/OrchestrationEventStore.ts b/apps/server/src/persistence/Layers/OrchestrationEventStore.ts index 4d81cf5e8d..688d063ab9 100644 --- a/apps/server/src/persistence/Layers/OrchestrationEventStore.ts +++ b/apps/server/src/persistence/Layers/OrchestrationEventStore.ts @@ -192,6 +192,10 @@ const makeEventStore = Effect.gen(function* () { payloadJson: event.payload, metadataJson: event.metadata, }).pipe( + Effect.retry({ + while: (error) => error._tag === "SqlError" && error.reason._tag === "ConstraintError", + times: 3, + }), Effect.mapError( toPersistenceSqlOrDecodeError( "OrchestrationEventStore.append:insert",