Skip to content

Commit

Permalink
Workaround for dotnet/efcore#15074
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss committed Jul 4, 2020
1 parent 09c763b commit 64952bc
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ public static void UseDbConflictHandling(this IApplicationBuilder applicationBui
}
catch (DbUpdateException e)
{
if (e.InnerException is OperationCanceledException)
{
logger.LogTrace("Rethrowing DbUpdateException as OperationCanceledException: {0}", e);
throw e.InnerException;
}
logger.LogDebug("Database conflict: {0}", e.Message);
await new ConflictObjectResult(new ErrorMessage(ErrorCode.DatabaseIntegrityConflict)
{
Expand Down

0 comments on commit 64952bc

Please sign in to comment.