Skip to content
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

Fix rate limiting header #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bookernath
Copy link

What?

Fix the rate limiting header used to determine how much time remains in the current rate limiting window, which is useful for understanding how long you must wait before resuming requests. This was using the the wrong header name.

@bigcommerce/api-client-developers

@@ -83,7 +83,7 @@ class Request {

// If the API limit has been reached
if (res.statusCode === 429) {
const timeToWait = res.headers['x-retry-after'];
const timeToWait = res.headers['X-Rate-Limit-Time-Reset-Ms'];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@bc-chaz bc-chaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants