Skip to content

[Digital twins] DT Retry-After is not matching with core rest client #25647

Open

Description

  • @azure/digital-twins-core:
  • ^1.1.0:
  • Operating system:
  • nodejs
    • 16.13:
  • browser
    • name/version:
  • typescript
    • ^4.3.5:
  • Is the bug related to documentation in

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:

retryOptions: {
  maxRetries: 20,
  retryDelayInMs: 5000,
},

don't change anything. My queries got immediate rejected with QuotaExceptionError. After some investigation of your code I spot that also there is no Retry-After header in response as mentioned in the docs. I found it in @azure/core-rest-pipeline/dist/index.js@getRetryAfterInMs.

if (!(response && [429, 503].includes(response.status)))
  return undefined;

Status code is 200 for QuotaExceptionError.

const retryAfterHeader = response.headers.get(RetryAfterHeader);

There is no "retry-after-ms", "x-ms-retry-after-ms", "Retry-After" in response.

To Reproduce
Steps to reproduce the behavior:

  1. Execute few DT queries using digitalTwinsClient.queryTwins() till you will get QuotaExceptionError.

Expected behavior
Retry logic is working.

Screenshots
Here is function which I modified.
Screenshot 2023-04-24 at 23 46 02

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Digital TwinsServiceThis issue points to a problem in the service.Service AttentionWorkflow: This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions