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 limit detection #108

Merged
merged 1 commit into from
Sep 10, 2019

Conversation

alanshaw
Copy link

@alanshaw alanshaw commented Aug 5, 2019

body is not null. In my experience I got:

body: '{"data":{"rateLimit":{"cost":1,"remaining":0,"resetAt":"2019-08-05T12:01:30Z"},"node":{"comments":{"pageInfo":{"endCursor"...

I'm not certain why it would need to be null and why inspection of the header wouldn't suffice.

status check is also unnecessary, queryRequest rejects for non-200 responses so rateLimited will not be called in this case.

`body` is not null. In my experience I got:

```json
body: '{"data":{"rateLimit":{"cost":1,"remaining":0,"resetAt":"2019-08-05T12:01:30Z"},"node":{"comments":{"pageInfo":{"endCursor"...
```

I'm not certain why it would need to be `null` and why inspection of the header wouldn't suffice.

`statusCode` check is also unnecessary, `queryRequest` rejects for non-200 responses so `rateLimited` will not be called in this case.
@RichardLitt
Copy link
Member

@alanshaw Awesome! I've been wondering about this. Thank you.

@RichardLitt RichardLitt merged commit b5ce577 into mntnr:master Sep 10, 2019
@alanshaw alanshaw deleted the fix/rate-limit-detection branch September 11, 2019 05:39
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