I'm trying to retry a failed operation 3 times.
I'm using Polly for a retry operation.
I want to get the exception in case the retry operation fails and retry again 2 times and so on.
return await Policy
.Handle<CustomException>()
.RetryAsync(3, onRetryAsync: async (exception, retryCount, context) =>
{
return await runner.run(params);
});
The function should return
Task<IReadOnlyCollection<string>>
I'm getting the following error:
async lambda expression converted to a task returning delegate cannot return a value