diff --git a/src/manifest/dbtProject.ts b/src/manifest/dbtProject.ts index bc1b4fdce..c8936c283 100644 --- a/src/manifest/dbtProject.ts +++ b/src/manifest/dbtProject.ts @@ -827,6 +827,7 @@ export class DBTProject implements Disposable { error, { column, model }, ); + throw error; } } diff --git a/src/webview_provider/altimateWebviewProvider.ts b/src/webview_provider/altimateWebviewProvider.ts index c26a9ff0a..37ce841e9 100644 --- a/src/webview_provider/altimateWebviewProvider.ts +++ b/src/webview_provider/altimateWebviewProvider.ts @@ -135,6 +135,7 @@ export class AltimateWebviewProvider implements WebviewViewProvider { this.sendResponseToWebview({ command: "response", syncRequestId, + status: true, data: response, }); } catch (error) { @@ -154,6 +155,7 @@ export class AltimateWebviewProvider implements WebviewViewProvider { command: "response", syncRequestId, error: message, + status: false, }); } } diff --git a/webview_panels/src/modules/documentationEditor/components/tests/forms/AcceptedValues.tsx b/webview_panels/src/modules/documentationEditor/components/tests/forms/AcceptedValues.tsx index 71237113e..b1a74b7f2 100644 --- a/webview_panels/src/modules/documentationEditor/components/tests/forms/AcceptedValues.tsx +++ b/webview_panels/src/modules/documentationEditor/components/tests/forms/AcceptedValues.tsx @@ -4,6 +4,7 @@ import { LoadingButton, OptionType, Select, Stack } from "@uicore"; import { useEffect, useState } from "react"; import { Control, Controller, UseFormSetValue } from "react-hook-form"; import { SaveRequest } from "../types"; +import { panelLogger } from "@modules/logger"; interface Props { control: Control; @@ -24,23 +25,28 @@ const AcceptedValues = ({ const [isLoading, setIsLoading] = useState(false); const getDistinctColumnValues = async () => { setIsLoading(true); - const result = (await executeRequestInSync("getDistinctColumnValues", { - model: currentDocsData?.name, - column, - })) as string[] | undefined; - setIsLoading(false); + try { + const result = (await executeRequestInSync("getDistinctColumnValues", { + model: currentDocsData?.name, + column, + })) as string[] | undefined; - if (result?.length && values?.length) { - const items = ["Yes, overwrite", "Cancel"]; - const response = await executeRequestInSync("showInformationMessage", { - infoMessage: "Overwrite the existing values?", - items, - }); - if (response !== items[0]) { - return; + if (result?.length && values?.length) { + const items = ["Yes, overwrite", "Cancel"]; + const response = await executeRequestInSync("showInformationMessage", { + infoMessage: "Overwrite the existing values?", + items, + }); + if (response !== items[0]) { + return; + } } + setValue("accepted_values", result); + } catch (e) { + panelLogger.error("Unable to get distinct values", e); + } finally { + setIsLoading(false); } - setValue("accepted_values", result); }; useEffect(() => {