diff --git a/src/components/clients/SitesForm.vue b/src/components/clients/SitesForm.vue index 967cce4..0d8de9a 100644 --- a/src/components/clients/SitesForm.vue +++ b/src/components/clients/SitesForm.vue @@ -115,9 +115,13 @@ export default { onMounted(async () => { $q.loading.show(); - const fields = await fetchCustomFields({ model: "site" }); - customFields.value = fields.filter(field => !field.hide_in_ui); - if (props.site) getSiteCustomFieldValues(); + try { + const fields = await fetchCustomFields({ model: "site" }); + customFields.value = fields.filter(field => !field.hide_in_ui); + if (props.site) getSiteCustomFieldValues(); + } catch (e) { + console.error(e); + } $q.loading.hide(); }); diff --git a/src/components/logs/PendingActions.vue b/src/components/logs/PendingActions.vue index 5ff0b0d..693d7c8 100644 --- a/src/components/logs/PendingActions.vue +++ b/src/components/logs/PendingActions.vue @@ -128,7 +128,12 @@ export default { const showCompleted = ref(false); const loading = ref(false); const completedCount = computed(() => { - return actions.value.filter(action => action.status === "completed").length; + try { + return actions.value.filter(action => action.status === "completed").length; + } catch (e) { + console.error(e); + return 0; + } }); const visibleColumns = computed(() => { diff --git a/src/views/TakeControl.vue b/src/views/TakeControl.vue index 4e6a3c0..73ccd5a 100644 --- a/src/views/TakeControl.vue +++ b/src/views/TakeControl.vue @@ -66,10 +66,14 @@ export default { async function getMeshURLs() { $q.loading.show(); - const data = await fetchAgentMeshCentralURLs(params.agent_id); - control.value = data.control; - status.value = data.status; - useMeta({ title: `${data.hostname} - ${data.client} - ${data.site} | Remote Background` }); + try { + const data = await fetchAgentMeshCentralURLs(params.agent_id); + control.value = data.control; + status.value = data.status; + useMeta({ title: `${data.hostname} - ${data.client} - ${data.site} | Remote Background` }); + } catch (e) { + console.error(e); + } $q.loading.hide(); }