forked from mirror/pixelfed
Merge pull request #3113 from pixelfed/staging
Update exception handler
This commit is contained in:
commit
039328a32e
1 changed files with 7 additions and 2 deletions
|
@ -5,7 +5,6 @@ namespace App\Exceptions;
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
use League\OAuth2\Server\Exception\OAuthServerException;
|
use League\OAuth2\Server\Exception\OAuthServerException;
|
||||||
use Zttp\ConnectionException;
|
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
{
|
{
|
||||||
|
@ -16,7 +15,9 @@ class Handler extends ExceptionHandler
|
||||||
*/
|
*/
|
||||||
protected $dontReport = [
|
protected $dontReport = [
|
||||||
OAuthServerException::class,
|
OAuthServerException::class,
|
||||||
ConnectionException::class
|
\Zttp\ConnectionException::class,
|
||||||
|
\GuzzleHttp\Exception\ConnectException::class,
|
||||||
|
\Illuminate\Http\Client\ConnectionException::class
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,6 +52,10 @@ class Handler extends ExceptionHandler
|
||||||
$this->reportable(function (\BadMethodCallException $e) {
|
$this->reportable(function (\BadMethodCallException $e) {
|
||||||
return app()->environment() !== 'production';
|
return app()->environment() !== 'production';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$this->reportable(function (\Illuminate\Http\Client\ConnectionException $e) {
|
||||||
|
return app()->environment() !== 'production';
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue