Closed jmguzik closed 2 years ago
I know this is documented for GitHub REST API (v3) at https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits and https://docs.github.com/en/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits.
Do you know if this is documented for GitHub GraphQL API (v4) as well, somewhere at https://docs.github.com/en/graphql? I'm only finding https://docs.github.com/en/graphql/overview/resource-limitations, and no mention of Retry-After
header there.
I have checked this myself and for several API 4 messages it was always there. It would be nice to have that but I found a workaround, a round tripper modification with a decorator is good enough to have this done.
Hi @dmitshur, would you accept the PR that would add to the error messages RetryAfter from header? Github tells in response how many seconds one must wait to query again (eg: in case of 403 -> secondary rate limit exceeded). We have implemented a mechanism of retrying for APIv3. We would like to have similar for v4.
I may missed something, but if similar mechanism already exists and I can "get" to the message, please let me know. Thanks!