kasiazjc commented on a change in pull request #19112:
URL: https://github.com/apache/superset/pull/19112#discussion_r829993066
##########
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).
I did the repro steps (including removing datasets folder, changing folder)
and for some weird reason it worked for me and there was no hanging/error 🥲 so
I am not sure what is the flow now.
In the screenshot the error is shown at the bottom right, which is not
intuitive for the user as they are focused on the popover/modal and there is no
visual relationship between the two if that makes sense. I think the error
should be shown as an alert in the popover, but I would need more context.
--
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]