Open KuNman opened 1 year ago
Looks like an issue with the service sending the wrong HTTP code here.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @sourabhguha @inesk-vt.
Looks like an issue with the service sending the wrong HTTP code here.
Yes, response from DT backend is 200, not 429 for QuotaLimitException. I can understand why, but should be handled by http client then.
@KuNman You're right that we can try to work around this in the client, but in general we try to avoid fixing poor API design at the client level since some consumers use raw REST calls or third-party libraries to make requests. Pragmatically we might have to do something like that in this case, but I'd like to hear from the service team before we invest in workarounds.
Describe the bug Hey. While working with digital twins client and trying to execute few queries at same time I expected that options passed to
DigitalTwinsClient
:don't change anything. My queries got immediate rejected with
QuotaExceptionError
. After some investigation of your code I spot that also there is noRetry-After
header in response as mentioned in the docs. I found it in@azure/core-rest-pipeline/dist/index.js@getRetryAfterInMs
.Status code is 200 for
QuotaExceptionError
.There is no
"retry-after-ms", "x-ms-retry-after-ms", "Retry-After"
in response.To Reproduce Steps to reproduce the behavior:
digitalTwinsClient.queryTwins()
till you will getQuotaExceptionError
.Expected behavior Retry logic is working.
Screenshots Here is function which I modified.
Additional context Add any other context about the problem here.