Fix error handling in loadUnmanagedContainers method

This commit is contained in:
Andras Bacsai
2024-04-02 15:01:50 +02:00
parent 75b9f4fcbf
commit 0f4eab3cf2
2 changed files with 5 additions and 6 deletions

View File

@@ -42,7 +42,11 @@ class Resources extends Component
$this->dispatch('success', 'Resource statuses refreshed.');
}
public function loadUnmanagedContainers() {
$this->unmanagedContainers = $this->server->loadUnmanagedContainers();
try {
$this->unmanagedContainers = $this->server->loadUnmanagedContainers();
} catch (\Throwable $e) {
return handleError($e, $this);
}
}
public function mount() {
$this->unmanagedContainers = collect();