Goal:
If you have tried the third time and it is not a success. Then you want to use another method.
I would like to to prevent displaying a error message webpage.
Problem:
is it possible to enter a method that is similiar as catch method in WaitAndRetryAsync?
RetryPolicy<HttpResponseMesssage> httpWaitAndRetryPolicy = Policy
.HandleResult<HttpResponseMessage>(r => !r.IsSuccessStatusCode)
.WaitAndRetryAsync
(3, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2. retryAttempt)/2));
Thank you!