File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/WebJobs.Script.Grpc/Server Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 11// Copyright (c) .NET Foundation. All rights reserved.
22// Licensed under the MIT License. See License.txt in the project root for license information.
33
4+ using System ;
45using System . Net . Http ;
56using System . Threading ;
67using System . Threading . Tasks ;
@@ -41,6 +42,19 @@ protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage
4142
4243 await Task . Delay ( currentDelay , cancellationToken ) ;
4344 }
45+ catch ( Exception ex )
46+ {
47+ if ( attemptCount == _maxRetries )
48+ {
49+ _logger . LogWarning ( "Reached the maximum retry count for worker request proxying. Error: {exception}" , ex ) ;
50+ }
51+ else
52+ {
53+ _logger . LogWarning ( $ "Unsupported exception type in { nameof ( RetryProxyHandler ) } . Request will not be retried. Exception: {{exception}}", ex ) ;
54+ }
55+
56+ throw ;
57+ }
4458 }
4559
4660 // This should never be reached.
You can’t perform that action at this time.
0 commit comments