mirror of
https://github.com/pelican-dev/panel.git
synced 2026-05-04 18:00:48 +03:00
Replace some guzzle exceptions and fix server creation failures (#848)
* Replace guzzle exceptions * Pint fixes * Fix test * Remove unused imports * Catch & Notify the user instead of 500 * Update app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php Co-authored-by: Boy132 <Boy132@users.noreply.github.com> --------- Co-authored-by: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com> Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Exceptions\Http\Connection;
|
||||
|
||||
use Exception;
|
||||
use Illuminate\Http\Response;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use App\Exceptions\DisplayException;
|
||||
use Illuminate\Support\Facades\Context;
|
||||
|
||||
@@ -22,7 +22,7 @@ class DaemonConnectionException extends DisplayException
|
||||
/**
|
||||
* Throw a displayable exception caused by a daemon connection error.
|
||||
*/
|
||||
public function __construct(GuzzleException $previous, bool $useStatusCode = true)
|
||||
public function __construct(?Exception $previous, bool $useStatusCode = true)
|
||||
{
|
||||
/** @var \GuzzleHttp\Psr7\Response|null $response */
|
||||
$response = method_exists($previous, 'getResponse') ? $previous->getResponse() : null;
|
||||
|
||||
Reference in New Issue
Block a user