Add connection error handling and improve modal component structure
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user