From 9965493568fe0a4d3b271d2219d328772cbaf0a0 Mon Sep 17 00:00:00 2001 From: justin-park Date: Fri, 31 Mar 2023 16:04:20 -0700 Subject: [PATCH] fix(sqllab): undefined issue_codes on query error --- superset-frontend/src/SqlLab/actions/sqlLab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/SqlLab/actions/sqlLab.js b/superset-frontend/src/SqlLab/actions/sqlLab.js index 4b65b599258c2..260f9944f9b04 100644 --- a/superset-frontend/src/SqlLab/actions/sqlLab.js +++ b/superset-frontend/src/SqlLab/actions/sqlLab.js @@ -275,7 +275,7 @@ export function queryFailed(query, msg, link, errors) { ts: new Date().getTime(), }; errors?.forEach(({ error_type: errorType, extra }) => { - const messages = extra?.issue_codes.map(({ message }) => message) || [ + const messages = extra?.issue_codes?.map(({ message }) => message) || [ errorType, ]; messages.forEach(message => {