Skip to content

Commit fe96781

Browse files
Added a "Known issues" section describing a potential issue with Grpc.Net.ClientFactory library (#42476)
* Adds a "Known issues" section describing potential issue described here dotnet/extensions#4924 * Apply suggestions from code review --------- Co-authored-by: David Pine <david.pine@microsoft.com>
1 parent ee1b536 commit fe96781

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/core/resilience/http-resilience.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,33 @@ The preceding diagram depicts:
234234
- If the response is unsuccessful (HTTP non-200), the resilience pipeline employs the configured resilience strategies.
235235

236236
While this is a simple example, it demonstrates how the resilience strategies can be used to handle transient errors. For more information, see [Polly docs: Strategies](https://www.pollydocs.org/strategies).
237+
238+
## Known issues
239+
240+
The following sections detail various known issues.
241+
242+
### Compatibility with the `Grpc.Net.ClientFactory` package
243+
244+
If you're using `Grpc.Net.ClientFactory` version `2.63.0` or earlier, then enabling the standard resilience or hedging handlers for a gRPC client could cause a runtime exception. Specifically, consider the following code sample:
245+
246+
```csharp
247+
services
248+
.AddGrpcClient<Greeter.GreeterClient>()
249+
.AddStandardResilienceHandler();
250+
```
251+
252+
The preceding code results in the following exception:
253+
254+
```Output
255+
System.InvalidOperationException: The ConfigureHttpClient method is not supported when creating gRPC clients. Unable to create client with name 'GreeterClient'.
256+
```
257+
258+
To resolve this issue, we recommend upgrading to `Grpc.Net.ClientFactory` version `2.64.0` or later.
259+
260+
There's a build time check that verifies if you're using `Grpc.Net.ClientFactory` version `2.63.0` or earlier, and if you are the check produces a compilation warning. You can suppress the warning by setting the following property in your project file:
261+
262+
```xml
263+
<PropertyGroup>
264+
<SuppressCheckGrpcNetClientFactoryVersion>true</SuppressCheckGrpcNetClientFactoryVersion>
265+
</PropertyGroup>
266+
```

0 commit comments

Comments
 (0)