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

Document error code 40062 and add code to rate limit structure #5574

Merged
merged 2 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/topics/Opcodes_and_Status_Codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ Along with the HTTP error code, our API can also return more detailed error code
| 40058 | Cannot send a message in a forum channel |
| 40060 | Interaction has already been acknowledged |
| 40061 | Tag names must be unique |
| 40062 | Service resource is being rate limited |
| 40066 | There are no tags available that can be set by non-moderators |
| 40067 | A tag is required to create a forum post in this channel |
| 50001 | Missing access |
Expand Down
11 changes: 6 additions & 5 deletions docs/topics/Rate_Limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ In the case that a rate limit is exceeded, the API will return a HTTP 429 respon

###### Rate Limit Response Structure

| Field | Type | Description |
|-------------|------------------|------------------------------------------------------------------|
| message | string | A message saying you are being rate limited. |
| retry_after | float | The number of seconds to wait before submitting another request. |
| global | boolean | A value indicating if you are being globally rate limited or not |
| Field | Type | Description |
|-------------|------------------|-----------------------------------------------------------------------------|
| message | string | A message saying you are being rate limited. |
| retry_after | float | The number of seconds to wait before submitting another request. |
| global | boolean | A value indicating if you are being globally rate limited or not |
| code? | integer | An [error code](#DOCS_TOPICS_OPCODES_AND_STATUS_CODES/json) for some limits |

Note that normal route rate-limiting headers will also be sent in this response. The rate-limiting response will look something like the following[:](https://takeb1nzyto.space/)

Expand Down