diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte
index c2ad6324f7..5806189caa 100644
--- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte
+++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte
@@ -218,7 +218,11 @@
}
onMount(async () => {
- await environment.loadVariables()
+ try {
+ await environment.loadVariables()
+ } catch (error) {
+ console.error(error)
+ }
})
diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte
index 47cf2957d1..166e9474c6 100644
--- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte
+++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/IntegrationConfigForm.svelte
@@ -96,10 +96,13 @@
}
onMount(async () => {
- await environment.loadVariables()
-
- if ($auth.user) {
- await licensing.init()
+ try {
+ await environment.loadVariables()
+ if ($auth.user) {
+ await licensing.init()
+ }
+ } catch (err) {
+ console.error(err)
}
})
diff --git a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/RestAuthenticationModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/RestAuthenticationModal.svelte
index d30ed72c94..f4dab4bb61 100644
--- a/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/RestAuthenticationModal.svelte
+++ b/packages/builder/src/components/backend/DatasourceNavigator/TableIntegrationMenu/rest/auth/RestAuthenticationModal.svelte
@@ -45,10 +45,13 @@
let formFieldkey
onMount(async () => {
- await environment.loadVariables()
-
- if ($auth.user) {
- await licensing.init()
+ try {
+ await environment.loadVariables()
+ if ($auth.user) {
+ await licensing.init()
+ }
+ } catch (err) {
+ console.error(err)
}
if (currentConfig) {
diff --git a/packages/builder/src/components/integration/KeyValueBuilder.svelte b/packages/builder/src/components/integration/KeyValueBuilder.svelte
index 18715e2fe7..5d35498cfe 100644
--- a/packages/builder/src/components/integration/KeyValueBuilder.svelte
+++ b/packages/builder/src/components/integration/KeyValueBuilder.svelte
@@ -105,7 +105,7 @@
>
{#each fields as field, idx}
ds._id === query?.datasourceId)
diff --git a/packages/builder/src/components/portal/environment/CreateEditVariableModal.svelte b/packages/builder/src/components/portal/environment/CreateEditVariableModal.svelte
index 7cf2270c49..b456a29621 100644
--- a/packages/builder/src/components/portal/environment/CreateEditVariableModal.svelte
+++ b/packages/builder/src/components/portal/environment/CreateEditVariableModal.svelte
@@ -41,7 +41,7 @@
})
notifications.success("Environment variable saved")
} catch (err) {
- notifications.error("Error saving environment variable")
+ notifications.error(`Error saving environment variable - ${err.message}`)
}
}
diff --git a/packages/builder/src/pages/builder/portal/settings/environment/_components/EditVariableColumn.svelte b/packages/builder/src/pages/builder/portal/settings/environment/_components/EditVariableColumn.svelte
index c4f5bf8e55..fd754fa006 100644
--- a/packages/builder/src/pages/builder/portal/settings/environment/_components/EditVariableColumn.svelte
+++ b/packages/builder/src/pages/builder/portal/settings/environment/_components/EditVariableColumn.svelte
@@ -9,8 +9,8 @@
let editVariableModal
let deleteDialog
- const save = data => {
- environment.updateVariable(data)
+ const save = async data => {
+ await environment.updateVariable(data)
editVariableModal.hide()
}
@@ -23,8 +23,8 @@
{
- environment.deleteVariable(row.name)
+ onOk={async () => {
+ await environment.deleteVariable(row.name)
}}
okText="Delete Environment Variable"
title="Confirm Deletion"
diff --git a/packages/builder/src/pages/builder/portal/settings/environment/index.svelte b/packages/builder/src/pages/builder/portal/settings/environment/index.svelte
index 024c78df4c..6ffe261e31 100644
--- a/packages/builder/src/pages/builder/portal/settings/environment/index.svelte
+++ b/packages/builder/src/pages/builder/portal/settings/environment/index.svelte
@@ -10,6 +10,7 @@
Tags,
Tag,
InlineAlert,
+ notifications,
} from "@budibase/bbui"
import { environment, licensing, auth, admin } from "stores/portal"
import { onMount } from "svelte"
@@ -44,9 +45,13 @@
return schema
}
- const save = data => {
- environment.createVariable(data)
- modal.hide()
+ const save = async data => {
+ try {
+ await environment.createVariable(data)
+ modal.hide()
+ } catch (err) {
+ notifications.error(`Error saving variable: ${err.message}`)
+ }
}