betodealmeida commented on a change in pull request #17988: URL: https://github.com/apache/superset/pull/17988#discussion_r781637083
########## File path: superset-frontend/src/reports/actions/reports.js ########## @@ -105,22 +104,10 @@ export const addReport = report => dispatch => SupersetClient.post({ endpoint: `/api/v1/report/`, jsonPayload: report, - }) - .then(({ json }) => { - dispatch({ type: ADD_REPORT, json }); - dispatch(addSuccessToast(t('The report has been created'))); - }) - .catch(async e => { - const parsedError = await getClientErrorObject(e); - const errorMessage = parsedError.message; - const errorArr = Object.keys(errorMessage); - const error = errorMessage[errorArr[0]]; - dispatch( - addDangerToast( - t('An error occurred while editing this report: %s', error), - ), - ); - }); + }).then(({ json }) => { + dispatch({ type: ADD_REPORT, json }); + dispatch(addSuccessToast(t('The report has been created'))); + }); Review comment: Ah, makes sense, because we're no longer showing the error in the toaster, but in the modal. Thanks for clarifying! :) -- 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-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org