Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

feat(RateLimits): optionally error on ratelimits #77

Merged
merged 7 commits into from
Dec 2, 2021

Conversation

ckohen
Copy link
Member

@ckohen ckohen commented Oct 25, 2021

Please describe the changes this PR makes and why it should be merged:

Ported from discordjs/discord.js#5659

Needs #51

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
  • This PR changes the library's interface (methods or parameters added)

@codecov
Copy link

codecov bot commented Oct 25, 2021

Codecov Report

Merging #77 (c190f00) into main (46c9183) will increase coverage by 0.02%.
The diff coverage is 89.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #77      +/-   ##
==========================================
+ Coverage   88.83%   88.86%   +0.02%     
==========================================
  Files           8        9       +1     
  Lines        1344     1455     +111     
  Branches      142      152      +10     
==========================================
+ Hits         1194     1293      +99     
- Misses          9       12       +3     
- Partials      141      150       +9     
Impacted Files Coverage Δ
...ackages/rest/src/lib/handlers/SequentialHandler.ts 82.44% <80.00%> (-0.48%) ⬇️
packages/rest/src/lib/errors/RateLimitError.ts 93.33% <93.33%> (ø)
packages/rest/src/lib/REST.ts 96.46% <100.00%> (+0.28%) ⬆️
packages/rest/src/lib/RequestManager.ts 94.20% <100.00%> (+0.31%) ⬆️
packages/rest/src/lib/utils/constants.ts 100.00% <100.00%> (ø)

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 46c9183...c190f00. Read the comment docs.

@iCrawl iCrawl added this to In progress in REST via automation Oct 26, 2021
packages/rest/src/lib/RequestManager.ts Outdated Show resolved Hide resolved
packages/rest/src/lib/handlers/SequentialHandler.ts Outdated Show resolved Hide resolved
REST automation moved this from In progress to Review in progress Oct 26, 2021
@ckohen ckohen marked this pull request as ready for review October 30, 2021 10:32
@ckohen
Copy link
Member Author

ckohen commented Oct 30, 2021

Not really sure why CI is failing (cache is set to npm when we're using yarn though, so maybe that's it?)

@iCrawl
Copy link
Member

iCrawl commented Oct 30, 2021

That might just be my fault, yes 😆
Will fix and then request a rebase.

packages/rest/src/lib/REST.ts Outdated Show resolved Hide resolved
packages/rest/src/lib/REST.ts Outdated Show resolved Hide resolved
packages/rest/src/lib/REST.ts Outdated Show resolved Hide resolved
kyranet
kyranet previously requested changes Nov 2, 2021
packages/rest/__tests__/RequestHandler.test.ts Outdated Show resolved Hide resolved
ckohen and others added 5 commits November 3, 2021 00:15
Ported from discordjs/discord.js#5659

Co-authored-by: Ven <vendicated@riseup.net>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
kyranet
kyranet previously approved these changes Nov 13, 2021
REST automation moved this from Review in progress to Reviewer approved Nov 14, 2021
iCrawl
iCrawl previously approved these changes Nov 14, 2021
packages/rest/src/lib/REST.ts Outdated Show resolved Hide resolved
packages/rest/src/lib/handlers/SequentialHandler.ts Outdated Show resolved Hide resolved
REST automation moved this from Reviewer approved to Review in progress Nov 14, 2021
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
@ckohen ckohen dismissed stale reviews from iCrawl and kyranet via c190f00 November 15, 2021 00:21
REST automation moved this from Review in progress to Reviewer approved Dec 2, 2021
@iCrawl iCrawl merged commit a371f0b into discordjs:main Dec 2, 2021
REST automation moved this from Reviewer approved to Done Dec 2, 2021
@ckohen ckohen deleted the ratelimit-errors branch December 2, 2021 23:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
REST
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants