You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2021/08/18 17:25:13 UTC
[superset] 02/02: remove extra idx reference
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch hugh/show-full-error-for-reports
in repository https://gitbox.apache.org/repos/asf/superset.git
commit f8d9614062438a78233e1a7d35e3cf980482c91e
Author: hughhhh <hu...@gmail.com>
AuthorDate: Wed Aug 18 13:21:21 2021 -0400
remove extra idx reference
---
superset-frontend/src/reports/actions/reports.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/superset-frontend/src/reports/actions/reports.js b/superset-frontend/src/reports/actions/reports.js
index 46c8934..adcb805 100644
--- a/superset-frontend/src/reports/actions/reports.js
+++ b/superset-frontend/src/reports/actions/reports.js
@@ -17,6 +17,7 @@
* under the License.
*/
/* eslint camelcase: 0 */
+import { ConsoleSqlOutlined } from '@ant-design/icons';
import { t, SupersetClient } from '@superset-ui/core';
import rison from 'rison';
import { getClientErrorObject } from 'src/utils/getClientErrorObject';
@@ -110,12 +111,11 @@ export const addReport = report => dispatch => {
.catch(async e => {
const parsedError = await getClientErrorObject(e);
const errorMessage = parsedError.message;
- // Do we need this?
- // const errorArr = Object.keys(errorMessage);
- // const error = errorMessage[errorArr[0]][0];
+ const errorArr = Object.keys(errorMessage);
+ const error = errorMessage[errorArr[0]];
dispatch(
addDangerToast(
- t('An error occurred while editing this report: %s', errorMessage),
+ t('An error occurred while editing this report: %s', error),
),
);
});