Add connection error handling and improve modal component structure

This commit is contained in:
2026-02-01 13:03:03 -05:00
parent 15aa0008fa
commit 40ea5dc0b6
3 changed files with 44 additions and 41 deletions

View File

@@ -276,6 +276,10 @@ class Component extends BaseComponent
]);
$this->status = null;
}
} catch (\Illuminate\Http\Client\ConnectionException $e) {
// Timeout or connection error - don't log as error, just set status to null
\Log::info('Connection timeout loading VM status for server ' . $this->server->id);
$this->status = null;
} catch (\Throwable $e) {
\Log::error('Exception loading VM status for server ' . $this->server->id, [
'server_id' => $this->server->id,

View File

@@ -79,7 +79,7 @@ class Proxmox extends ClassServer
'Content-Type' => 'application/json',
])->withOptions([
'verify' => $this->config('verify_ssl') ? true : false,
])->$method($url, $data)->throw();
])->timeout(15)->connectTimeout(5)->$method($url, $data)->throw();
return $response;
}