mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
improve handling of throttle exceptions
This commit is contained in:
parent
6f84b4fdd7
commit
49dbad37de
@ -104,7 +104,8 @@ class Handler extends ExceptionHandler
|
|||||||
if (Ninja::isHosted()) {
|
if (Ninja::isHosted()) {
|
||||||
|
|
||||||
if($exception instanceof ThrottleRequestsException && class_exists(\Modules\Admin\Events\ThrottledExceptionRaised::class)) {
|
if($exception instanceof ThrottleRequestsException && class_exists(\Modules\Admin\Events\ThrottledExceptionRaised::class)) {
|
||||||
event(new \Modules\Admin\Events\ThrottledExceptionRaised(auth()->user()->account->key));
|
$uri = urldecode(request()->getRequestUri());
|
||||||
|
event(new \Modules\Admin\Events\ThrottledExceptionRaised(auth()->user()?->account?->key, $uri));
|
||||||
}
|
}
|
||||||
|
|
||||||
Integration::configureScope(function (Scope $scope): void {
|
Integration::configureScope(function (Scope $scope): void {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user