-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Storage Queue] How to use retry policy? #11338
Comments
Thanks for reporting @gmantri @xirzec This falls into the bucket of some common documentation we should have in this repo that applies across packages to cover topics like retries and logging. Can you log an issue to track all such documentation we want to have? @jeremymeng Meanwhile, can you share pointers on how to use the retry policy? |
Thanks @ramya-rao-a! One more issue I would like to pile on with this is the ability to add On a different note, is there a way I can contribute towards improving the documentation? I have been using SDK quite extensively and there are places where documentation needs more details. For example, take a look at the
I could possibly try and fix the documentation wherever it is possible. |
@ramya-rao-a the tracking issue for core documentation is here: #10239 @gmantri We automatically set a client request id in this policy: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-http/src/policies/generateClientRequestIdPolicy.ts If you really want to set your own header for this you could set a custom header with the correct name: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-http/src/operationOptions.ts#L31 The SignedIdentifier doc issue looks like something is broken in the docs pipeline, since the definition here looks similar to what you discovered:
|
Thanks @xirzec for replying. I am wondering if you can share a code sample for setting custom header. I looked up the link you shared but unfortunately still clueless as to how you would go about using it. I would really appreciate that. |
@gmantri Storage libraries don't use blobServiceClient.listContainers({
customHeaders: {
myheader: "my header value"
}
}) We also have a sample showing how to set the |
For retry please use StorageRetryOptions to customize the pipeline: azure-sdk-for-js/sdk/storage/storage-queue/samples/typescript/src/customPipeline.ts Lines 26 to 28 in 5fa7f3f
|
@gmantri Please let us know if you have any further questions. We have tracked the doc issue of |
@jeremymeng Thank you for your help! I am all set. |
Describe the bug
In the older versions of SDK, defining a retry policy was rather simple using something like the following:
I am wondering how can we do the same with the new SDK. I looked around but could not find any information/code samples regarding that. Any pointers will be highly appreciated.
The text was updated successfully, but these errors were encountered: