Skip to content

Commit

Permalink
final edits
Browse files Browse the repository at this point in the history
  • Loading branch information
AAfghahi committed Dec 2, 2022
1 parent 5730d3b commit 3a1eadf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
11 changes: 5 additions & 6 deletions superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,11 @@ export default function ErrorAlert({
}
>
<>
{subtitle && (
<>
<p>{subtitle}</p>
<br />
</>
)}
<p>{subtitle}</p>
{/* This break was in the original design of the modal but
the spacing looks really off if there is only
subtitle or a body */}
{subtitle && body && <br />}
{body}
</>
</ErrorModal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,13 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
: typeof dbErrors === 'string'
? [dbErrors]
: [];
} else if (
!isEmpty(validationErrors) &&
validationErrors?.error_type === 'GENERIC_DB_ENGINE_ERROR'
) {
alertErrors = [
validationErrors?.description || validationErrors?.message,
];
}
if (alertErrors.length) {
return (
Expand All @@ -1165,9 +1172,8 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
description={t(
'We are unable to connect to your database. Click "See more" for database-provided information that may help troubleshoot the issue.',
)}
stackTrace={alertErrors?.[0]}
subtitle={alertErrors?.[0] || validationErrors?.description}
copyText={validationErrors?.description}
subtitle={validationErrors?.description}
/>
</ErrorAlertContainer>
);
Expand Down

0 comments on commit 3a1eadf

Please sign in to comment.