Modifed RetryPolicy to be a provider that returns a retry context