From bc8e84b8156468b8440cda65a54d7169c8a6bacf Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 20 Oct 2023 12:19:04 +0100 Subject: [PATCH] Fixing datasource error states causing a datasource to fail to be built fully - this was simply a frontend issue of the error not being handled on creation. --- packages/builder/src/stores/backend/datasources.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/stores/backend/datasources.js b/packages/builder/src/stores/backend/datasources.js index 11184f2caa..c0c37a7651 100644 --- a/packages/builder/src/stores/backend/datasources.js +++ b/packages/builder/src/stores/backend/datasources.js @@ -81,9 +81,9 @@ export function createDatasourcesStore() { })) } - const updateDatasource = response => { + const updateDatasource = (response, { ignoreErrors } = {}) => { const { datasource, errors } = response - if (errors && Object.keys(errors).length > 0) { + if (!ignoreErrors && errors && Object.keys(errors).length > 0) { throw new TableImportError(errors) } replaceDatasource(datasource._id, datasource) @@ -137,7 +137,7 @@ export function createDatasourcesStore() { fetchSchema: integration.plus, }) - return updateDatasource(response) + return updateDatasource(response, { ignoreErrors: true }) } const update = async ({ integration, datasource }) => {