Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consumer API: Starting multiple sync runs in parallel leads to an internal server error #512

Merged
merged 7 commits into from
Feb 6, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private async Task<SyncRun> CreateNewSyncRun(IEnumerable<ExternalEvent> events)
}
catch (DbUpdateException ex)
{
if (ex.HasReason(DbUpdateExceptionReason.DuplicateIndex))
if (ex.HasReason(DbUpdateExceptionReason.DuplicateIndex) || ex.HasReason(DbUpdateExceptionReason.UniqueKeyViolation))
throw new OperationFailedException(ApplicationErrors.SyncRuns.CannotStartSyncRunWhenAnotherSyncRunIsRunning());

throw;
Expand Down
Loading