rusackas commented on a change in pull request #19112:
URL: https://github.com/apache/superset/pull/19112#discussion_r829689120



##########
File path: superset-frontend/src/views/CRUD/hooks.ts
##########
@@ -448,7 +448,10 @@ export function useImportResource(
                 t(
                   'An error occurred while importing %s: %s',
                   resourceLabel,
-                  error.errors.map(payload => payload.message).join('\n'),
+                  [
+                    ...error.errors.map(payload => payload.message),
+                    'Please re-export your file and try importing again',

Review comment:
       Thanks for the catch! A few thoughts:
   * Are we sure that re-export and trying again will reliably fix the issue? I 
just want to make sure if we tell the user to take an action on the error that 
they have all the information they need to succeed at it.
   * Definitely do wrap UI strings in `t()` as a general practice
   * @kasiazjc has been capturing and evaluating error messages like this, and 
may have input on this one as well (cc @yousoph as well). 




-- 
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]

Reply via email to