azure-sdk-for-cpp
azure-sdk-for-cpp copied to clipboard
Retry policy supports service-specific retry logic
Is your feature request related to a problem? Please describe.
Storage team needs this feature for one of STG94 features.
We need to decide whether or not to retry a response based on a new response header x-ms-copy-source-error-code.
Describe the solution you'd like
Add an optional field into RetryOptions. This field is a lambda function, taking a raw response as parameter. Service sdk can set this field and add some service-specific logic to determine if a response should be retried.
Describe alternatives you've considered
Something similar to ResponseClassifier in .Net SDK
https://github.com/Azure/azure-sdk-for-net/blob/bb90af89e27be84541e142a4ffd648825a2fdbe2/sdk/storage/Azure.Storage.Common/src/Shared/StorageResponseClassifier.cs
Additional context
None
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- [x] Description Added
- [x] Expected solution specified