Skip to content

Comments

fix: #981 - Add SC_TOO_MANY_REQUESTS (429) status code#982

Open
omatheusmesmo wants to merge 2 commits intojakartaee:mainfrom
omatheusmesmo:fix/981-429-too-many-request-response-code-is-not-there
Open

fix: #981 - Add SC_TOO_MANY_REQUESTS (429) status code#982
omatheusmesmo wants to merge 2 commits intojakartaee:mainfrom
omatheusmesmo:fix/981-429-too-many-request-response-code-is-not-there

Conversation

@omatheusmesmo
Copy link

Problem

The HttpServletResponse interface 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_REQUESTS constant to the HttpServletResponse interface and provides a unit test to verify its definition.

  • API Update: Added SC_TOO_MANY_REQUESTS = 429 to jakarta.servlet.http.HttpServletResponse.
  • Unit Test: Added HttpServletResponseTooManyRequestsTest to verify that the constant is correctly assigned the value 429.

Related Issue

Fixes #981

Verification Results

  • Code follows project formatting (2-space indentation)
  • Commits follow Eclipse Foundation guidelines and Conventional Commits

Matheus Oliveira 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>
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.

429 [too many request] response code is not there

1 participant