-
-
Notifications
You must be signed in to change notification settings - Fork 102
[Platform] Add status code 429 to rate limit exceeded exception #586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[Platform] Add status code 429 to rate limit exceeded exception #586
Conversation
junaidbinfarooq
commented
Sep 15, 2025
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
Docs? | no |
Issues | Fix #528 Builds on #538 |
License | MIT |
Is it really common to use the status code as exception code? |
Generally speaking, it does make sense to have the code present, and application-level code can be interested in the exception code, which in this case would map to the 429 status code. |
Definitely no. This PR start to creating a confusion between both IMHO.
You can manually do the mapping
|
There are libraries where the two are kept separate, and likely some where the code is directly mapped to the status code, especially in the context of HTTP, but PHP doesn't care how you decide to use the exception code property, AFAIK.
Why? You shared the example of Symfony's HttpException class. Does it not have a status code field so that the application users get the status code OOTB? Perhaps, we can have a status code field here too. |
a statusCode field makes much more sense to me |
Since we have mutiple exception, like #543 I dunno @chr-hertel @OskarStark if we should
|
@chr-hertel @OskarStark |
@chr-hertel @OskarStark |
a statusCode would work |