eschutho commented on code in PR #25303: URL: https://github.com/apache/superset/pull/25303#discussion_r1332161111
########## superset-frontend/src/components/Datasource/DatasourceModal.tsx: ########## @@ -202,11 +207,16 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({ }) .catch(response => { setIsSaving(false); - getClientErrorObject(response).then(({ error }) => { + response.json().then((errorJson: ErrorResponse) => { modal.error({ - title: t('Error'), - content: error || t('An error has occurred'), + title: t('Error saving dataset'), okButtonProps: { danger: true, className: 'btn-danger' }, + content: ( + <ErrorMessageWithStackTrace + error={errorJson.errors[0]} Review Comment: How confident are we that the api response will have this format? -- 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