Show missing if we can’t connect

This commit is contained in:
Lance Pioch 2024-04-19 22:32:52 -04:00
parent 3db6593b0e
commit 1c0e91a301

View File

@ -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();