Skip to content

Commit

Permalink
Merge pull request #25664 from github/repo-sync
Browse files Browse the repository at this point in the history
repo sync
  • Loading branch information
Octomerger authored May 22, 2023
2 parents 7de32a5 + 91eebd6 commit 2a61e56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions content/rest/guides/best-practices-for-integrators.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ In this example the `closed` action is checked first before calling the `process

The {% data variables.product.company_short %} API rate limit ensures that the API is fast and available for everyone.

If you hit a rate limit, it's expected that you stop making requests until after the time specified by the `x-ratelimit-reset` header. Failure to do so may result in the banning of your app. For more information, see "[AUTOTITLE](/rest/overview/resources-in-the-rest-api#rate-limiting)."
If you hit a rate limit, you should stop making requests until after the time specified by the `x-ratelimit-reset` header. Failure to do so may result in the banning of your integration. For more information, see "[AUTOTITLE](/rest/overview/resources-in-the-rest-api#rate-limiting)."

## Dealing with secondary rate limits
### Dealing with secondary rate limits

{% data variables.product.company_short %} may use secondary rate limits to ensure API availability. For more information, see "[AUTOTITLE](/rest/overview/resources-in-the-rest-api#secondary-rate-limits)."
{% data variables.product.company_short %} may also use secondary rate limits to ensure API availability. For more information, see "[AUTOTITLE](/rest/overview/resources-in-the-rest-api#secondary-rate-limits)."

To avoid hitting this limit, you should ensure your application follows the guidelines below.

Expand All @@ -156,7 +156,8 @@ To avoid hitting this limit, you should ensure your application follows the guid
`Retry-After` header will always be an integer, representing the number of seconds you should wait
before making requests again. For example, `Retry-After: 30` means you should wait 30 seconds
before sending more requests.
* Otherwise, retry your request after the time specified by the `x-ratelimit-reset` header. The `x-ratelimit-reset` header will always be an integer representing the time at which the current rate limit window resets in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time).
* If the `x-ratelimit-remaining` header is `0`, retry your request after the time specified by the `x-ratelimit-reset` header. The `x-ratelimit-reset` header will always be an integer representing the time at which the current rate limit window resets in [UTC epoch seconds](https://en.wikipedia.org/wiki/Unix_time).
* Otherwise, wait for an exponentially increasing amount of time between retries, and throw an error after a specific number of retries.

{% data variables.product.company_short %} reserves the right to change these guidelines as needed to ensure availability.

Expand Down
2 changes: 1 addition & 1 deletion content/rest/overview/resources-in-the-rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ If your application triggers an additional rate limit, you'll receive an informa
> }
```
You should wait and try your request again after a few minutes. If the `retry-after` response header is present, you should not retry your request until after that many seconds has elapsed. Otherwise, you should not retry your request until the time, in UTC epoch seconds, specified by the `x-ratelimit-reset` header.
You should wait and try your request at a later time. If the `retry-after` response header is present, you should not retry your request until after that many seconds has elapsed. If the `x-ratelimit-remaining` header is `0`, you should not retry your request until after the time, in UTC epoch seconds, specified by the `x-ratelimit-reset` header. Otherwise, wait for an exponentially increasing amount of time between retries, and throw an error after a specific number of retries.
{% ifversion fpt or ghec %}
Expand Down

0 comments on commit 2a61e56

Please sign in to comment.