Merge pull request #1091 from openclassify/vedatakd

sentry fixed
This commit is contained in:
Fatih Alp 2021-06-03 15:26:13 +03:00 committed by GitHub
commit c8428dc4a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 31 deletions

View File

@ -2,34 +2,19 @@
namespace App\Exceptions;
use Anomaly\Streams\Platform\Exception\ExceptionIdentifier;
use Exception;
use Swift_TransportException;
use Throwable;
use Illuminate\Support\Facades\Auth;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Auth;
use Swift_TransportException;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Throwable;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
class ExceptionHandler extends Handler
{
/**
* The exception instance.
*
* @var Exception
*/
protected $original;
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $internalDontReport = [
\Illuminate\Auth\AuthenticationException::class,
\Illuminate\Auth\Access\AuthorizationException::class,
@ -39,14 +24,14 @@ class ExceptionHandler extends Handler
\Illuminate\Validation\ValidationException::class,
];
protected function prepareException(Exception $e)
protected function prepareException(Throwable $e)
{
$this->original = $e;
return parent::prepareException($e); // TODO: Change the autogenerated stub
}
public function render($request, Exception $e)
public function render($request, Throwable $e)
{
if ($e instanceof AuthenticationException) {
return $this->unauthenticated($request, $e);
@ -84,8 +69,7 @@ class ExceptionHandler extends Handler
);
}
public function report(Exception $e)
public function report(Throwable $e)
{
if (app()->bound('sentry')
&& $this->shouldReport($e)

View File

@ -32,7 +32,7 @@ return [
*/
'bindings' => [
// 'Anomaly\Streams\Platform\Exception\ExceptionHandler' => ExceptionHandler::class
'Anomaly\Streams\Platform\Exception\ExceptionHandler' => ExceptionHandler::class
],
/*