fix: reporting handler

This commit is contained in:
Andras Bacsai
2023-09-29 10:21:11 +02:00
parent 3749970831
commit fbaec769f0
4 changed files with 7 additions and 5 deletions

View File

@@ -55,10 +55,12 @@ class Handler extends ExceptionHandler
}
app('sentry')->configureScope(
function (Scope $scope) {
$email = auth()?->user() ? auth()->user()->email : 'guest';
$instanceAdmin = User::find(0)->email ?? 'admin@localhost';
$scope->setUser(
[
'email' => auth()->user()->email,
'instanceAdmin' => User::find(0)->email
'email' => $email,
'instanceAdmin' => $instanceAdmin
]
);
}