Generic ITransientErrorDetectionStrategy
Hello,
ITransientErrorDetection.IsTransient accepts only an exception and it forces the code to throw exceptions even if not needed. I think it would help having an additional interface defined with a generic type, for example
public interface ITransientErrorDetection<T>
{
bool IsTransient(T error);
}
This way it would still work with the current implementation of retry policy, but also allow cases when the error is not an exception but an error code or message. An example of usage would be with HttpClient which doesn't throw an exception when a return status code is an error
Thoughts?
Thanks,
Pedro