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

enhancement(http): add error codes 20029 and 50055 #1326

Merged
merged 1 commit into from
Dec 11, 2021
Merged

enhancement(http): add error codes 20029 and 50055 #1326

merged 1 commit into from
Dec 11, 2021

Conversation

zeylahellyer
Copy link
Member

Add two new HTTP error codes:

  • 20029: The write action you are performing on the server has hit the write rate limit1
  • 50055: Invalid Guild2

Add two new HTTP error codes:

- 20029: The write action you are performing on the server has hit the
  write rate limit[1]
- 50055: Invalid Guild[2]

[1]: discord/discord-api-docs#4214
[2]: discord/discord-api-docs#4212

Signed-off-by: Zeyla Hellyer <[email protected]>
@zeylahellyer zeylahellyer added c-http Affects the http crate d-api Change related to Discord's API. t-enhancement labels Dec 11, 2021
@7596ff
Copy link
Contributor

7596ff commented Dec 11, 2021

Part of #1171.

@codecov-commenter
Copy link

Codecov Report

Merging #1326 (94bd78c) into main (ea71104) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1326   +/-   ##
=======================================
  Coverage   30.97%   30.98%           
=======================================
  Files         365      365           
  Lines       14495    14501    +6     
=======================================
+ Hits         4490     4493    +3     
- Misses      10005    10008    +3     
Impacted Files Coverage Δ
http/src/api_error.rs 8.72% <100.00%> (+1.12%) ⬆️
http/src/routing/route_display.rs 15.54% <0.00%> (-0.38%) ⬇️
http/src/routing/route.rs 7.14% <0.00%> (-0.28%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea71104...94bd78c. Read the comment docs.

@7596ff 7596ff merged commit c49628b into twilight-rs:main Dec 11, 2021
@zeylahellyer zeylahellyer deleted the http-feat-2-error-codes branch December 11, 2021 23:27
7596ff added a commit that referenced this pull request Dec 15, 2021
Additions

Add the API error codes `20029 WriteActionsReached` and `50055
InvalidGuild` ([#1326] - [@zeylahellyer]).

Changes

Only send the interaction authorization token when responding to
interactions ([#1317] - [@zeylahellyer]).

Fixes

Fix an issue where interaction and webhook tokens were invalidating the
entire client ([#1318] - [@zeylahellyer]). The client now only
invalidates a token if the request that failed was actually using it.

`CommandBorrowed::kind` is now properly serialized as `type` ([#1323] -
[@7596ff]).

Fix a variety of routes in `RouteDisplay` after adding tests ([#1327] -
[@zeylahellyer]). The fixed routes are `CreateGuildPrune`,
`SyncGuildIntegration`, and `UpdateUserVoiceState`.

[#1317]: #1317
[#1318]: #1318
[#1323]: #1323
[#1326]: #1326
[#1327]: #1327

[@7596ff]: https://github.com/7596ff
[@zeylahellyer]: https://github.com/zeylahellyer
7596ff added a commit that referenced this pull request Dec 24, 2021
Additions

Add the API error code `50109 RequestInvalidJson` ([#1338] -
[@vilgotf]).

[#1326]: #1326
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-http Affects the http crate d-api Change related to Discord's API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants