Skip to content

Commit 52147cd

Browse files
add sql error to back in context
1 parent 42a8595 commit 52147cd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

apps/src/metabase/helpers/DOMToState.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ export async function convertDOMtoStateSQLQueryV2() : Promise<MetabaseAppStateSQ
179179
);
180180
const dbId = await getSelectedDbId();
181181
const selectedDatabaseInfo = dbId ? await getDatabaseInfo(dbId) : undefined;
182+
const sqlErrorMessage = await getSqlErrorMessage();
183+
182184
return {
183185
type: MetabaseAppStateType.SQLEditor,
184186
version: '2',
@@ -189,7 +191,8 @@ export async function convertDOMtoStateSQLQueryV2() : Promise<MetabaseAppStateSQ
189191
currentCard,
190192
outputMarkdown,
191193
parameterValues,
192-
selectedDatabaseInfo
194+
selectedDatabaseInfo,
195+
sqlErrorMessage
193196
}
194197
}
195198

apps/src/metabase/helpers/analystModeTypes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export interface MetabaseAppStateSQLEditorV2 extends MetabaseAppStateBase {
2727
currentCard: Card
2828
outputMarkdown: string
2929
parameterValues: ParameterValues
30+
sqlErrorMessage?: string
3031
}
3132

3233
export interface MetabaseAppStateDashboardV2 extends MetabaseAppStateBase {

0 commit comments

Comments
 (0)