Skip to content

Commit 64952bc

Browse files
committed
Workaround for dotnet/efcore#15074
1 parent 09c763b commit 64952bc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Tgstation.Server.Host/Extensions/ApplicationBuilderExtensions.cs

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ public static void UseDbConflictHandling(this IApplicationBuilder applicationBui
4040
}
4141
catch (DbUpdateException e)
4242
{
43+
if (e.InnerException is OperationCanceledException)
44+
{
45+
logger.LogTrace("Rethrowing DbUpdateException as OperationCanceledException: {0}", e);
46+
throw e.InnerException;
47+
}
48+
4349
logger.LogDebug("Database conflict: {0}", e.Message);
4450
await new ConflictObjectResult(new ErrorMessage(ErrorCode.DatabaseIntegrityConflict)
4551
{

0 commit comments

Comments
 (0)