diff --git a/lerna.json b/lerna.json index 29b136397f..f0ce7b92cb 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.5.10-alpha.0", + "version": "2.5.10-alpha.3", "npmClient": "yarn", "packages": [ "packages/backend-core", diff --git a/packages/builder/src/builderStore/store/automation/index.js b/packages/builder/src/builderStore/store/automation/index.js index dc1e2a2cc1..9e5516c512 100644 --- a/packages/builder/src/builderStore/store/automation/index.js +++ b/packages/builder/src/builderStore/store/automation/index.js @@ -147,6 +147,9 @@ const automationActions = store => ({ testData, }) if (!result?.trigger && !result?.steps?.length) { + if (result?.err?.code === "usage_limit_exceeded") { + throw "You have exceeded your automation quota" + } throw "Something went wrong testing your automation" } store.update(state => { diff --git a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte index cd170142e4..17d5b35575 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/FlowChart/TestDataModal.svelte @@ -52,7 +52,7 @@ await automationStore.actions.test($selectedAutomation, testData) $automationStore.showTestPanel = true } catch (error) { - notifications.error("Error testing automation") + notifications.error(error) } } diff --git a/packages/client/src/components/app/Button.svelte b/packages/client/src/components/app/Button.svelte index 018f21c583..a074986342 100644 --- a/packages/client/src/components/app/Button.svelte +++ b/packages/client/src/components/app/Button.svelte @@ -5,6 +5,8 @@ const { styleable, builderStore } = getContext("sdk") const component = getContext("component") + let handlingOnClick = false + export let disabled = false export let text = "" export let onClick @@ -16,6 +18,16 @@ export let icon = null export let active = false + const handleOnClick = async () => { + handlingOnClick = true + + if (onClick) { + await onClick() + } + + handlingOnClick = false + } + let node $: $component.editing && node?.focus() @@ -37,9 +49,9 @@