mirror of
https://github.com/apache/superset.git
synced 2026-04-21 09:04:38 +00:00
feat: adding logging to validation (#16527)
* adding logging to validation * Update superset-frontend/src/views/CRUD/data/database/DatabaseModal/index.tsx Co-authored-by: Beto Dealmeida <roberto@dealmeida.net> Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
This commit is contained in:
@@ -908,14 +908,14 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const message: Array<string> = Object.values(dbErrors);
|
||||
const message: Array<string> =
|
||||
typeof dbErrors === 'object' ? Object.values(dbErrors) : [];
|
||||
return (
|
||||
<Alert
|
||||
type="error"
|
||||
css={(theme: SupersetTheme) => antDErrorAlertStyles(theme)}
|
||||
message="Database Creation Error"
|
||||
description={message[0]}
|
||||
description={message?.[0] || dbErrors}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user