Merge pull request #3113 from pixelfed/staging

Update exception handler
This commit is contained in:
daniel 2021-12-31 01:15:44 -07:00 committed by GitHub
commit 039328a32e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,6 @@ namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
use League\OAuth2\Server\Exception\OAuthServerException;
use Zttp\ConnectionException;
class Handler extends ExceptionHandler
{
@ -16,7 +15,9 @@ class Handler extends ExceptionHandler
*/
protected $dontReport = [
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) {
return app()->environment() !== 'production';
});
$this->reportable(function (\Illuminate\Http\Client\ConnectionException $e) {
return app()->environment() !== 'production';
});
}
/**