We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd60f0e commit 73de267Copy full SHA for 73de267
src/Sentry/Laravel/Http/SetRequestMiddleware.php
@@ -8,6 +8,7 @@
8
use Illuminate\Http\Request;
9
use Psr\Http\Message\ServerRequestInterface;
10
use Sentry\State\HubInterface;
11
+use Throwable;
12
13
/**
14
* This middleware caches a PSR-7 version of the request as early as possible.
@@ -34,8 +35,8 @@ private function resolvePsrRequest(Container $container): ?ServerRequestInterfac
34
35
{
36
try {
37
return $container->make(ServerRequestInterface::class);
- } catch (BindingResolutionException $e) {
38
- // This happens if Laravel doesn't have the correct classes available to construct the PSR-7 object
+ } catch (Throwable $e) {
39
+ // Do not crash if there is an exception thrown while resolving the request object
40
}
41
42
return null;
0 commit comments