Răsfoiți Sursa

Update exception handler

Daniel Supernault 3 ani în urmă
părinte
comite
f4e12c42b3
1 a modificat fișierele cu 8 adăugiri și 2 ștergeri
  1. 8 2
      app/Exceptions/Handler.php

+ 8 - 2
app/Exceptions/Handler.php

@@ -5,7 +5,7 @@ namespace App\Exceptions;
 use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
 use Throwable;
 use League\OAuth2\Server\Exception\OAuthServerException;
-use Zttp\ConnectionException;
+use
 
 class Handler extends ExceptionHandler
 {
@@ -16,7 +16,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 +53,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';
+		});
 	}
 
 	/**