You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/09/19 15:45:06 UTC
[GitHub] [superset] john-bodley commented on a diff in pull request #20823: fix(dashboard): add toast if JSON metadata is invalid
john-bodley commented on code in PR #20823:
URL: https://github.com/apache/superset/pull/20823#discussion_r974411277
##########
superset-frontend/src/dashboard/components/PropertiesModal/index.tsx:
##########
@@ -294,7 +296,12 @@ const PropertiesModal = ({
// color scheme in json metadata has precedence over selection
if (currentJsonMetadata?.length) {
- const metadata = JSON.parse(currentJsonMetadata);
+ let metadata;
+ try {
+ metadata = JSON.parse(currentJsonMetadata);
+ } catch (error) {
+ addDangerToast(t('JSON metadata is invalid!'));
Review Comment:
@zhaoyongjie is there any update regarding a fix for this?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org