etr2460 commented on a change in pull request #12049:
URL:
https://github.com/apache/incubator-superset/pull/12049#discussion_r543527197
##########
File path: superset/errors.py
##########
@@ -100,6 +103,15 @@ class SupersetErrorType(str, Enum):
),
},
],
+ SupersetErrorType.MISSING_TEMPLATE_PARAMS_ERROR: [
Review comment:
wanna update the docs file with the issue codes too?
##########
File path: superset-frontend/src/SqlLab/components/ResultSet.tsx
##########
@@ -489,10 +490,15 @@ export default class ResultSet extends
React.PureComponent<
return <Alert bsStyle="warning">Query was stopped</Alert>;
}
if (query.state === 'failed') {
+ const title =
+ query?.errors?.[0].error_type ===
+ ErrorTypeEnum.MISSING_TEMPLATE_PARAMS_ERROR
+ ? t('Parameter Error')
+ : t('Database Error');
Review comment:
yeah, ideally this logic would be handled by the error component
registry, but since we're not using the new error format for all SQL Lab
errors, that's not possible yet. Maybe add a todo comment to clean this up?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]