eschutho commented on code in PR #25831:
URL: https://github.com/apache/superset/pull/25831#discussion_r1380904623
##########
superset-frontend/src/features/tags/TagModal.tsx:
##########
@@ -234,10 +238,14 @@ const TagModal: React.FC<TagModalProps> = ({
name: tagName,
objects_to_tag: [...dashboards, ...charts, ...savedQueries],
},
- }).then(({ json = {} }) => {
- refreshData();
- addSuccessToast(t('Tag created'));
- });
+ })
+ .then(({ json = {} }) => {
+ refreshData();
+ addSuccessToast(t('Tag created'));
+ })
+ .catch(err =>
+ addDangerToast(err.message ? err.message : 'Error Creating Tag'),
Review Comment:
maybe also translate the error and you can define it elsewhere with the
translation since it's used in multiple places.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]