Skip to content

SDK doesn't appear to use Retry-After on 429s #978

Closed
@gavinbarron

Description

@gavinbarron

Bug Report

Prerequisites

  • Can you reproduce the problem?
  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you perform a cursory search?

Description

During testing of a tool to simulate 429s on the network layer (i.e. outside of the JavaScript library) it was observed that a when a Retry-After or 5s was returned to the client application the SDK issued a retry request before the 5s window had elapsed

Console Errors: N/A

Screenshots:

Steps to Reproduce

  1. Use the ChaosProxy sample using the sdk and with the proxy running with 99% failure rate and only 429s as the allowed errors
  2. see that the a retry is sent before the 5s wait period is finished

Expected behavior: [What you expected to happen]
SDK should not be retrying until after the number of seconds provided in the Retry-After header

Actual behavior: [What actually happened]
SDK retries the request at 3s and eventually succeeds due to the exponential backoff behavior

Additional Context

Add any other context about the problem here..
Chaos Proxy is here: https://github.com/microsoftgraph/msgraph-chaos-proxy (Microsoft private repo at present)

Usage Information

Request ID - N/A

SDK Version - script link to https://cdn.jsdelivr.net/npm/@microsoft/microsoft-graph-client/lib/graph-js-sdk.js so I assume latest

  • Browser (Check, if using Browser version of SDK)

Browser Name - Edge

Version - 105

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions