fix: #981 - Add SC_TOO_MANY_REQUESTS (429) status code#982
Open
omatheusmesmo wants to merge 2 commits intojakartaee:mainfrom
Open
fix: #981 - Add SC_TOO_MANY_REQUESTS (429) status code#982omatheusmesmo wants to merge 2 commits intojakartaee:mainfrom
omatheusmesmo wants to merge 2 commits intojakartaee:mainfrom
Conversation
added 2 commits
February 14, 2026 08:20
Add the HTTP 429 "Too Many Requests" status code to the HttpServletResponse interface. This allows the API to support rate-limiting scenarios as requested. Signed-off-by: Matheus Oliveira <hi@omatheusmesmo.dev>
Add a unit test to verify that SC_TOO_MANY_REQUESTS is correctly defined as 429 and is distinct from other common status codes. Signed-off-by: Matheus Oliveira <hi@omatheusmesmo.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
HttpServletResponseinterface is missing the HTTP 429 "Too Many Requests" status code. This code is essential for modern web applications that implement rate limiting or throttling, and its absence prevents developers from using a standardized constant for this purpose.Solution
This PR adds the
SC_TOO_MANY_REQUESTSconstant to theHttpServletResponseinterface and provides a unit test to verify its definition.SC_TOO_MANY_REQUESTS = 429tojakarta.servlet.http.HttpServletResponse.HttpServletResponseTooManyRequestsTestto verify that the constant is correctly assigned the value 429.Related Issue
Fixes #981
Verification Results