This commit is contained in:
Andras Bacsai
2023-06-22 21:17:53 +02:00
parent 37646bcfa0
commit 1304631aad
4 changed files with 47 additions and 35 deletions

View File

@@ -21,6 +21,9 @@ class PrivateKey extends Component
Toaster::success('Server is reachable with this private key.');
}
} catch (\Exception $e) {
$this->server->settings->is_reachable = false;
$this->server->settings->is_usable = false;
$this->server->settings->save();
return general_error_handler(customErrorMessage: "Server is not reachable. Reason: {$e->getMessage()}", that: $this);
}
}