From 8d6c00644a4604938f4e97222a977d2ed64d3105 Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Thu, 27 Apr 2023 13:33:22 +0100 Subject: [PATCH] Improve Automations Error Message --- packages/builder/src/builderStore/store/automation/index.js | 3 +++ .../AutomationBuilder/FlowChart/TestDataModal.svelte | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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) } }