mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 23:54:44 +02:00
Show missing if we can’t connect
This commit is contained in:
parent
3db6593b0e
commit
1c0e91a301
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Repositories\Daemon;
|
namespace App\Repositories\Daemon;
|
||||||
|
|
||||||
|
use App\Enums\ContainerStatus;
|
||||||
|
use Exception;
|
||||||
use Webmozart\Assert\Assert;
|
use Webmozart\Assert\Assert;
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use GuzzleHttp\Exception\GuzzleException;
|
use GuzzleHttp\Exception\GuzzleException;
|
||||||
@ -25,6 +27,8 @@ class DaemonServerRepository extends DaemonRepository
|
|||||||
);
|
);
|
||||||
} catch (TransferException $exception) {
|
} catch (TransferException $exception) {
|
||||||
throw new DaemonConnectionException($exception, false);
|
throw new DaemonConnectionException($exception, false);
|
||||||
|
} catch (Exception) {
|
||||||
|
return ['state' => ContainerStatus::Missing->value];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $response->json();
|
return $response->json();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user