Skip to content

Fix Timing of clearRequestId and Update Trackers Type Parameter - #8355

Closed
saurabhhhcodes wants to merge 1 commit into
JhaSourav07:mainfrom
saurabhhhcodes:fix/commitpulse-batch-2
Closed

Fix Timing of clearRequestId and Update Trackers Type Parameter#8355
saurabhhhcodes wants to merge 1 commit into
JhaSourav07:mainfrom
saurabhhhcodes:fix/commitpulse-batch-2

Conversation

@saurabhhhcodes

Copy link
Copy Markdown
Contributor

Changes

  • middleware/middleware: Removed premature clearRequestId() that cleared request ID before downstream handlers could use it
  • lib/rate-limit: Fixed DistributedCache type parameter for trackers from object to number to match incr() usage

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Someone is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@retenta-bot

retenta-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown

This PR improves the timing of the clearRequestId function to ensure that the request ID is available for downstream handlers, which is crucial for tracking requests accurately. Additionally, it corrects the type parameter for trackers in the rate-limiting library to align with the expected usage, as discussed in previous decisions regarding type consistency. These changes enhance the reliability of the middleware and align with our ongoing efforts to improve the architecture of our security measures. Thank you for your contributions!

@retenta-bot retenta-bot Bot changed the title fix: clearRequestId timing and trackers type parameter Fix Timing of clearRequestId and Update Trackers Type Parameter Jul 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @saurabhhhcodes! Thanks for your contribution! 🎉

Unfortunately, this PR has been automatically closed because it is not linked to any open issue.

To resolve this, please do the following:

  1. Link a valid open issue by editing your PR description to include a closing keyword (e.g., Fixes #<issue-number>).
  2. Reopen this PR once the link is added.

💡 You can link multiple issues if needed (e.g. Fixes #12, Closes #34).
If you're working on something that doesn't have an issue yet, please open one first and then link it here.

We look forward to reviewing your PR once an issue is linked! 🚀

@github-actions github-actions Bot closed this Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant