The whole concept of Polly is around policies which will execute your code. To review, open the file in an editor that reveals hidden Unicode characters. Polly.Policy.Handle() Example This is how we can deal with both transient and long term downtime in dependent services and keep application stable and robust. Using Polly to retry HTTP requests in .net. Example of Polly retry policy on gRPC client Raw Program.cs This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To handle various exceptions, you need to create one Policy for each exception and then use the Policy.WrapAsync(…). How to use Polly, Refit and .Net 5 | by Bernardo Teixeira | Geek ... How to add clean Retrying in .NET Core using Polly - YouTube Re-authorization and onRetry with Polly - no dogma blog The policy … Here’s a simple example of the HttpClientFactory in use. 2. A simple example could be: if a SQL timeout occurs, then “do something” (for example, try again N times). StatusCode == HttpStatusCode. Use Case: Re-establishing authentication using Retry.