rusackas commented on a change in pull request #19122:
URL: https://github.com/apache/superset/pull/19122#discussion_r830254223
##########
File path: superset-frontend/src/components/ReportModal/index.tsx
##########
@@ -250,9 +251,16 @@ const ReportModal: FunctionComponent<ReportProps> = ({
await dispatch(addReport(newReportValues as ReportObject));
onHide();
} catch (e) {
- const parsedError = await getClientErrorObject(e);
- const errorMessage = parsedError.message;
- onReducerChange(ActionType.error, errorMessage);
+ const { error } = await getClientErrorObject(e);
+ if (error) {
Review comment:
Let's put the error into the modal, rather than firing a toast message.
@yousoph will ping @jess-dillard about standardizing errors/warnings in modals
that do not attach to fields (e.g put it at the top? or the bottom?).
Jess is also doing an audit of error strings, and might have a sensible
default error string for this. For now, let's make the default error string "We
were unable to create your report. Please try again."
--
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]