From 2dcd881dc53a3669d26296150547f1ddb9640d12 Mon Sep 17 00:00:00 2001 From: rmt2021 <87200766+rmt2021@users.noreply.github.com> Date: Fri, 12 Aug 2022 11:54:32 -0500 Subject: [PATCH] Cosmos: retry on error codes 408 and 410 Fixes #28629 --- src/EFCore.Cosmos/Storage/Internal/CosmosExecutionStrategy.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/EFCore.Cosmos/Storage/Internal/CosmosExecutionStrategy.cs b/src/EFCore.Cosmos/Storage/Internal/CosmosExecutionStrategy.cs index f4fb760e212..af86cd955b7 100644 --- a/src/EFCore.Cosmos/Storage/Internal/CosmosExecutionStrategy.cs +++ b/src/EFCore.Cosmos/Storage/Internal/CosmosExecutionStrategy.cs @@ -104,7 +104,9 @@ protected override bool ShouldRetryOn(Exception exception) static bool IsTransient(HttpStatusCode statusCode) => statusCode == HttpStatusCode.ServiceUnavailable - || statusCode == HttpStatusCode.TooManyRequests; + || statusCode == HttpStatusCode.TooManyRequests + || statusCode == HttpStatusCode.RequestTimeout + || statusCode == HttpStatusCode.Gone; } ///