Custom exception message when using middleware api.throttle
Open
discussion
- Dominant language
- PHP
- Stars
- 9.4k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm using the api.throttle middleware when a user tries to login the application.
If he passed the rate limit, the middleware throws an HttpException, with the message "You have exceed your rate limit"
https://github.com/dingo/api/blob/b0491204a4f9c6ac305f344a0d30954175002364/src/Http/Middleware/RateLimit.php#L67
So, how can I change that message ONLY in this route? I know I can do custom exceptions, but in this case, the Exception is already fired so, any ideas?
Thx.
Contributor guide
Assessment
This issue has not been assessed yet.