Skip to content

Commit e96e370

Browse files
authored
Merge pull request #1331 from byin-lessen/update/membase-graph-db
set internal server error as retryable status code
2 parents 0d1d3f0 + 5c166ba commit e96e370

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Plugins/BotSharp.Plugin.Membase/GraphDb/MembaseGraphDb.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Net;
12
using Polly;
23
using Polly.Timeout;
34
using Refit;
@@ -75,7 +76,7 @@ private AsyncPolicy BuildRetryPolicy()
7576
.Handle<HttpRequestException>()
7677
.Or<TaskCanceledException>()
7778
.Or<TimeoutRejectedException>()
78-
.Or<ApiException>(ex => ex.StatusCode == HttpStatusCode.ServiceUnavailable)
79+
.Or<ApiException>(ex => ex.StatusCode == HttpStatusCode.ServiceUnavailable || ex.StatusCode == HttpStatusCode.InternalServerError)
7980
.WaitAndRetryAsync(
8081
retryCount: RetryCount,
8182
sleepDurationProvider: retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)),

0 commit comments

Comments
 (0)