Skip to content

Conversation

ckohen
Copy link
Member

@ckohen ckohen commented Aug 28, 2025

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

Adds two related utility options for managing rest requests more dynamically.
Retry Backoff is completely new, allows backing off on 5xx and aborted requests. Closes: #10571
timeout gets a callback utility, allows setting the timeout per request Closes: #10927 and supersedes #11013

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)

Copy link

vercel bot commented Aug 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
discord-js Ignored Ignored Preview Sep 6, 2025 11:11am
discord-js-guide Ignored Ignored Preview Sep 6, 2025 11:11am

Copy link

codecov bot commented Aug 28, 2025

Codecov Report

❌ Patch coverage is 81.48148% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.19%. Comparing base (5001897) to head (e51ebab).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
packages/rest/src/lib/handlers/Shared.ts 68.75% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11067      +/-   ##
==========================================
+ Coverage   44.06%   44.19%   +0.12%     
==========================================
  Files         310      310              
  Lines       17755    17816      +61     
  Branches     1755     1772      +17     
==========================================
+ Hits         7824     7874      +50     
- Misses       9919     9930      +11     
  Partials       12       12              
Flag Coverage Δ
core 0.88% <ø> (ø)
proxy 65.88% <ø> (ø)
rest 87.56% <81.48%> (-0.31%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ckohen ckohen marked this pull request as ready for review August 28, 2025 06:43
@ckohen ckohen requested a review from a team as a code owner August 28, 2025 06:43
Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com>
@Jiralite
Copy link
Member

Does this address #11000?

@Jiralite Jiralite added this to the rest 3.0.0 milestone Aug 30, 2025
@ckohen
Copy link
Member Author

ckohen commented Aug 30, 2025

No, not at all. That requires a change in discord.js not rest (which I'll get to later today)

kyranet
kyranet previously requested changes Sep 2, 2025
@github-project-automation github-project-automation bot moved this from Todo to Review in Progress in discord.js Sep 2, 2025
Copy link
Member

@didinele didinele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mentioned changing a thing in kyra's thread, other than that, LGTM

@github-project-automation github-project-automation bot moved this from Review in Progress to Review Approved in discord.js Sep 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Review Approved
Development

Successfully merging this pull request may close these issues.

members prune timeout Adding back-off during retries for REST handler
6 participants