improve handling of throttle exceptions

This commit is contained in:
David Bomba 2023-05-28 19:46:50 +10:00
parent 6f84b4fdd7
commit 49dbad37de

View File

@ -104,7 +104,8 @@ class Handler extends ExceptionHandler
if (Ninja::isHosted()) {
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 {