From 37646bcfa04df921211858ddab484664b935ccbb Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 22 Jun 2023 21:02:32 +0200 Subject: [PATCH] verbose error --- app/Http/Livewire/Server/PrivateKey.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Http/Livewire/Server/PrivateKey.php b/app/Http/Livewire/Server/PrivateKey.php index 57ec27e1f..e295b1616 100644 --- a/app/Http/Livewire/Server/PrivateKey.php +++ b/app/Http/Livewire/Server/PrivateKey.php @@ -16,14 +16,12 @@ class PrivateKey extends Component public function checkConnection() { try { - $uptime = instant_remote_process(['uptime'], $this->server, false); + $uptime = instant_remote_process(['uptime'], $this->server); if ($uptime) { Toaster::success('Server is reachable with this private key.'); - } else { - Toaster::error('Server is NOT reachable with this private key.'); } } catch (\Exception $e) { - return general_error_handler(err: $e, that: $this); + return general_error_handler(customErrorMessage: "Server is not reachable. Reason: {$e->getMessage()}", that: $this); } } public function setPrivateKey($private_key_id)