Feature request: prevent to send duplicate errors
Opened this issue · 1 comments
vmrfriz commented
Problem:
When external services are down, I continuously receive messages about it, several messages per second.
Solution:
Make a setting for limiting the number of identical messages per unit of time.
I can do this and offer a pull-request. I think this can be done using the Cache facade. But I'm not sure if this is the best way. If there are other options, tell me and I will make a pull request.
swaty007 commented
Laravel already have it, In Handler.php file you can write
public function throttle(Throwable $e)
{
if ($e instanceof YourException) {
return Limit::perMinute(30);
}
}