From 4df23dd2b8daaceb498a4c60aec9efe7272be32c Mon Sep 17 00:00:00 2001 From: Maurits Lourens Date: Tue, 8 Mar 2022 11:15:02 +0100 Subject: [PATCH] show correct error and keep modal open --- .../DatasourceNavigator/modals/DatasourceConfigModal.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte b/packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte index 8f1218f087..0aaa2b201d 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/modals/DatasourceConfigModal.svelte @@ -20,7 +20,9 @@ $goto(`./datasource/${resp._id}`) notifications.success(`Datasource updated successfully.`) } catch (err) { - notifications.error("Error saving datasource") + notifications.error(err?.message ?? "Error saving datasource") + // prevent the modal from closing + return false } }