You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Define the retry policy (retry on 5xx, 408, and transient errors)
@@ -28,15 +30,35 @@ public RetryHttpClientHandler()
28
30
onRetry:(outcome,timespan,attempt,context)=>
29
31
{
30
32
Logger.Debug($"Retry attempt {attempt} due to: {(outcome.Exception!=null?outcome.Exception.Message:$"{outcome.Result.StatusCode}")}");
31
-
Logger.Warn($"Retry attempt {attempt} will be triggered in {timespan.TotalSeconds} seconds due to: {(outcome.Exception!=null?outcome.Exception.Message:$"{outcome.Result.StatusCode}")}");
@@ -53,11 +75,10 @@ public static async Task ExecuteWithRetryAsync(Func<Task> action)
53
75
}
54
76
privatestaticTimeSpanGetRetryInterval(intattempt)
55
77
{
56
-
// Define retry intervals as constants or values
57
-
varretryIntervals=new[]{ApiConstant.APIRetryIntervalFirst,ApiConstant.APIRetryIntervalSecond,ApiConstant.APIRetryIntervalThird};// Retry intervals for 1st, 2nd, and 3rd attempts
0 commit comments