diff --git a/app/Http/Livewire/Server/Form.php b/app/Http/Livewire/Server/Form.php index 76dbb1a06..b3346fa23 100644 --- a/app/Http/Livewire/Server/Form.php +++ b/app/Http/Livewire/Server/Form.php @@ -56,14 +56,15 @@ public function validateServer() $this->uptime = $uptime; $this->emit('success', 'Server is reachable!'); } else { - throw new \Exception('Server is not rachable'); + $this->emit('error', 'Server is not rachable'); + return; } if ($dockerVersion) { $this->dockerVersion = $dockerVersion; $this->emit('proxyStatusUpdated'); $this->emit('success', 'Docker Engine 23+ is installed!'); } else { - throw new \Exception('Old Docker version detected (lower than 23).'); + $this->emit('error', 'Old (lower than 23) or no Docker version detected. Install Docker Engine on the General tab.'); } } catch (\Exception $e) { return general_error_handler($e, that: $this); diff --git a/app/Http/Livewire/Server/ShowPrivateKey.php b/app/Http/Livewire/Server/ShowPrivateKey.php index fe75d8cfd..993afde00 100644 --- a/app/Http/Livewire/Server/ShowPrivateKey.php +++ b/app/Http/Livewire/Server/ShowPrivateKey.php @@ -38,12 +38,13 @@ public function checkConnection() if ($uptime) { $this->emit('success', 'Server is reachable with this private key.'); } else { - throw new \Exception('Server is not reachable with this private key.'); + $this->emit('error', 'Server is not reachable with this private key.'); + return; } if ($dockerVersion) { $this->emit('success', 'Server is usable for Coolify.'); } else { - throw new \Exception('Old Docker version detected (lower than 23).'); + $this->emit('error', 'Old (lower than 23) or no Docker version detected. Install Docker Engine on the General tab.'); } } catch (\Exception $e) { throw new \Exception($e->getMessage());