Let's Encrypt Cert Error and Polly Retry
This is very much a temporary workaround, it circumvents normal checks on a certificate. You should only do it if you understand the consequences!
You might have seen discussions around Let’s Encrypts root cert expiring and causing all sorts of problems.
I hit one of them myself, I have an application that calls out to the Open Brewery DB using
HttpClient and it started to get
Fortunately there is Polly!! It can retry requests that fail, but change how the request is made before it is retried.
With Polly I can make a regular request, it fails because of the cert issue. Then I retry, and force
HttpClient to ignore the cert issue by adding a
HttpClientHandler to the
That’s it. Love Polly!
- Using Step Functions and C# Lambdas to Orchestrate API Calls
- Varying the Time Between Polly Retries Based on the Result
- Varying the Time Between Polly Retries Based on the Exception
- Simmy Chaos Engine for .NET – Part 4, Doing Some Real Damage, Dropping a Table
- Simmy Chaos Engine for .NET – Part 3, Adding Latency