File tree Expand file tree Collapse file tree 2 files changed +20
-53
lines changed Expand file tree Collapse file tree 2 files changed +20
-53
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
use App \Providers \AppServiceProvider ;
4
+ use Illuminate \Auth \Access \AuthorizationException ;
5
+ use Illuminate \Auth \AuthenticationException ;
6
+ use Illuminate \Database \Eloquent \ModelNotFoundException ;
4
7
use Illuminate \Foundation \Application ;
5
8
use Illuminate \Foundation \Configuration \Exceptions ;
6
9
use Illuminate \Foundation \Configuration \Middleware ;
10
+ use Illuminate \Session \TokenMismatchException ;
11
+ use Illuminate \Validation \ValidationException ;
12
+ use Symfony \Component \HttpKernel \Exception \HttpException ;
7
13
8
14
return Application::configure (basePath: dirname (__DIR__ ))
9
15
->withProviders ()
26
32
$ middleware ->throttleApi ();
27
33
})
28
34
->withExceptions (function (Exceptions $ exceptions ) {
29
- //
35
+ $ exceptions ->dontReport ([
36
+ AuthenticationException::class,
37
+ AuthorizationException::class,
38
+ HttpException::class,
39
+ ModelNotFoundException::class,
40
+ TokenMismatchException::class,
41
+ ValidationException::class,
42
+ ]);
43
+
44
+ $ exceptions ->reportable (function (Throwable $ e ) {
45
+ if (app ()->bound ('sentry ' )) {
46
+ app ('sentry ' )->captureException ($ e );
47
+ }
48
+ });
30
49
})->create ();
You can’t perform that action at this time.
0 commit comments