Skip to content

Commit 5b8933f

Browse files
authored
fix: get request instance using facade (#154)
1 parent d786771 commit 5b8933f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/HoneybadgerLaravel.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ public static function make(array $config): Reporter
6060

6161
public function notify(Throwable $throwable, ?Request $request = null, array $additionalParams = []): array
6262
{
63-
$this->setRouteActionAndUserContext($request ?: request());
63+
$this->setRouteActionAndUserContext($request ?: \Illuminate\Support\Facades\Request::instance());
64+
65+
if (!$this->shouldReport($throwable)) {
66+
return [];
67+
}
6468

6569
$result = parent::notify($throwable, $request, $additionalParams);
6670

0 commit comments

Comments
 (0)