Add error handling to prevent lazy loading from getting stuck
- Wrap bandwidth throttling check in try-catch in Server.php - Wrap loadVmStatus in try-catch in Component.php mount() - Add fallback UI in server.blade.php when status is unavailable - Show 'Unavailable' state instead of infinite skeleton loading
This commit is contained in:
@@ -34,7 +34,14 @@ class Component extends BaseComponent
|
||||
abort(403);
|
||||
}
|
||||
|
||||
$this->loadVmStatus();
|
||||
try {
|
||||
$this->loadVmStatus();
|
||||
} catch (\Throwable $e) {
|
||||
\Log::error('Failed to load VM status for server ' . $server->id, [
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
$this->status = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user